Skip to content

Commit

Permalink
PNPACPI: continue after _CRS and _PRS errors
Browse files Browse the repository at this point in the history
Keep going and register the device even if we have trouble parsing
_CRS or _PRS.  A parsing problem might mean we ignore some resources
the device is using, or we might not be able to change its resources.
But we should still take note of anything we *could* parse correctly.

Also remove reference to dev_id because I plan to remove it soon.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Bjorn Helgaas authored and Len Brown committed Apr 29, 2008
1 parent ca0e8b6 commit 4a49049
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/pnp/pnpacpi/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,7 @@ static int __init pnpacpi_add_device(struct acpi_device *device)
&dev->res);
if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) {
pnp_err("PnPACPI: METHOD_NAME__CRS failure for %s",
dev_id->id);
goto err1;
acpi_device_hid(device));
}
}

Expand All @@ -223,8 +222,7 @@ static int __init pnpacpi_add_device(struct acpi_device *device)
dev);
if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) {
pnp_err("PnPACPI: METHOD_NAME__PRS failure for %s",
dev_id->id);
goto err1;
acpi_device_hid(device));
}
}

Expand Down Expand Up @@ -252,8 +250,6 @@ static int __init pnpacpi_add_device(struct acpi_device *device)
num++;

return AE_OK;
err1:
kfree(dev_id);
err:
kfree(dev);
return -EINVAL;
Expand Down

0 comments on commit 4a49049

Please sign in to comment.