[PATCH] PNPACPI: check return value of pnpacpi_parse_allocated_resource() and pnpacpi_parse_resource_option_data()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Handle error condition since pnpacpi_parse_allocated_resource() and pnpacpi_parse_resource_option_data() could return -EPERM.

Signed-off-by: Arjun Sreedharan <arjun024@xxxxxxxxx>
---
 drivers/pnp/pnpacpi/core.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c
index b81448b..c3214e9 100644
--- a/drivers/pnp/pnpacpi/core.c
+++ b/drivers/pnp/pnpacpi/core.c
@@ -272,10 +272,14 @@ static int __init pnpacpi_add_device(struct acpi_device *device)
 		strncpy(dev->name, acpi_device_bid(device), sizeof(dev->name));
 
 	if (dev->active)
-		pnpacpi_parse_allocated_resource(dev);
+		error = pnpacpi_parse_allocated_resource(dev);
+		if (error)
+			return error;
 
 	if (dev->capabilities & PNP_CONFIGURABLE)
-		pnpacpi_parse_resource_option_data(dev);
+		error = pnpacpi_parse_resource_option_data(dev);
+		if (error)
+			return error;
 
 	list_for_each_entry(id, &device->pnp.ids, list) {
 		if (!strcmp(id->id, pnpid))
-- 
1.7.11.7

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux