forked from luck/tmp_suning_uos_patched
Merge branch 'agp-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/agp-2.6
* 'agp-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/agp-2.6: agp/hp: fail gracefully if we don't find an IOC agp/hp: fixup hp agp after ACPI changes agp: correct missing cleanup on error in agp_add_bridge
This commit is contained in:
commit
00fdb75b19
|
@ -285,18 +285,22 @@ int agp_add_bridge(struct agp_bridge_data *bridge)
|
||||||
{
|
{
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
if (agp_off)
|
if (agp_off) {
|
||||||
return -ENODEV;
|
error = -ENODEV;
|
||||||
|
goto err_put_bridge;
|
||||||
|
}
|
||||||
|
|
||||||
if (!bridge->dev) {
|
if (!bridge->dev) {
|
||||||
printk (KERN_DEBUG PFX "Erk, registering with no pci_dev!\n");
|
printk (KERN_DEBUG PFX "Erk, registering with no pci_dev!\n");
|
||||||
return -EINVAL;
|
error = -EINVAL;
|
||||||
|
goto err_put_bridge;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Grab reference on the chipset driver. */
|
/* Grab reference on the chipset driver. */
|
||||||
if (!try_module_get(bridge->driver->owner)) {
|
if (!try_module_get(bridge->driver->owner)) {
|
||||||
dev_info(&bridge->dev->dev, "can't lock chipset driver\n");
|
dev_info(&bridge->dev->dev, "can't lock chipset driver\n");
|
||||||
return -EINVAL;
|
error = -EINVAL;
|
||||||
|
goto err_put_bridge;
|
||||||
}
|
}
|
||||||
|
|
||||||
error = agp_backend_initialize(bridge);
|
error = agp_backend_initialize(bridge);
|
||||||
|
@ -326,6 +330,7 @@ int agp_add_bridge(struct agp_bridge_data *bridge)
|
||||||
agp_backend_cleanup(bridge);
|
agp_backend_cleanup(bridge);
|
||||||
err_out:
|
err_out:
|
||||||
module_put(bridge->driver->owner);
|
module_put(bridge->driver->owner);
|
||||||
|
err_put_bridge:
|
||||||
agp_put_bridge(bridge);
|
agp_put_bridge(bridge);
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
|
@ -488,9 +488,8 @@ zx1_gart_probe (acpi_handle obj, u32 depth, void *context, void **ret)
|
||||||
handle = obj;
|
handle = obj;
|
||||||
do {
|
do {
|
||||||
status = acpi_get_object_info(handle, &info);
|
status = acpi_get_object_info(handle, &info);
|
||||||
if (ACPI_SUCCESS(status)) {
|
if (ACPI_SUCCESS(status) && (info->valid & ACPI_VALID_HID)) {
|
||||||
/* TBD check _CID also */
|
/* TBD check _CID also */
|
||||||
info->hardware_id.string[sizeof(info->hardware_id.length)-1] = '\0';
|
|
||||||
match = (strcmp(info->hardware_id.string, "HWP0001") == 0);
|
match = (strcmp(info->hardware_id.string, "HWP0001") == 0);
|
||||||
kfree(info);
|
kfree(info);
|
||||||
if (match) {
|
if (match) {
|
||||||
|
@ -509,6 +508,9 @@ zx1_gart_probe (acpi_handle obj, u32 depth, void *context, void **ret)
|
||||||
handle = parent;
|
handle = parent;
|
||||||
} while (ACPI_SUCCESS(status));
|
} while (ACPI_SUCCESS(status));
|
||||||
|
|
||||||
|
if (ACPI_FAILURE(status))
|
||||||
|
return AE_OK; /* found no enclosing IOC */
|
||||||
|
|
||||||
if (hp_zx1_setup(sba_hpa + HP_ZX1_IOC_OFFSET, lba_hpa))
|
if (hp_zx1_setup(sba_hpa + HP_ZX1_IOC_OFFSET, lba_hpa))
|
||||||
return AE_OK;
|
return AE_OK;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user