Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 00fdb75b authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* '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
parents c07d7237 3d4a7882
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -285,18 +285,22 @@ int agp_add_bridge(struct agp_bridge_data *bridge)
{
	int error;

	if (agp_off)
		return -ENODEV;
	if (agp_off) {
		error = -ENODEV;
		goto err_put_bridge;
	}

	if (!bridge->dev) {
		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. */
	if (!try_module_get(bridge->driver->owner)) {
		dev_info(&bridge->dev->dev, "can't lock chipset driver\n");
		return -EINVAL;
		error = -EINVAL;
		goto err_put_bridge;
	}

	error = agp_backend_initialize(bridge);
@@ -326,6 +330,7 @@ int agp_add_bridge(struct agp_bridge_data *bridge)
	agp_backend_cleanup(bridge);
err_out:
	module_put(bridge->driver->owner);
err_put_bridge:
	agp_put_bridge(bridge);
	return error;
}
+4 −2
Original line number Diff line number Diff line
@@ -488,9 +488,8 @@ zx1_gart_probe (acpi_handle obj, u32 depth, void *context, void **ret)
	handle = obj;
	do {
		status = acpi_get_object_info(handle, &info);
		if (ACPI_SUCCESS(status)) {
		if (ACPI_SUCCESS(status) && (info->valid & ACPI_VALID_HID)) {
			/* TBD check _CID also */
			info->hardware_id.string[sizeof(info->hardware_id.length)-1] = '\0';
			match = (strcmp(info->hardware_id.string, "HWP0001") == 0);
			kfree(info);
			if (match) {
@@ -509,6 +508,9 @@ zx1_gart_probe (acpi_handle obj, u32 depth, void *context, void **ret)
		handle = parent;
	} 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))
		return AE_OK;