Skip to content

Commit 4a49049

Browse files
Bjorn Helgaaslenb
authored andcommitted
PNPACPI: continue after _CRS and _PRS errors
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 <[email protected]> Signed-off-by: Len Brown <[email protected]>
1 parent ca0e8b6 commit 4a49049

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/pnp/pnpacpi/core.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,7 @@ static int __init pnpacpi_add_device(struct acpi_device *device)
213213
&dev->res);
214214
if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) {
215215
pnp_err("PnPACPI: METHOD_NAME__CRS failure for %s",
216-
dev_id->id);
217-
goto err1;
216+
acpi_device_hid(device));
218217
}
219218
}
220219

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

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

254252
return AE_OK;
255-
err1:
256-
kfree(dev_id);
257253
err:
258254
kfree(dev);
259255
return -EINVAL;

0 commit comments

Comments
 (0)