diff options
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r-- | drivers/acpi/scan.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index c6db591479de..31218e1d2a18 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -28,8 +28,7 @@ static int acpi_bus_trim(struct acpi_device *start, int rmdevice); | |||
28 | static void acpi_device_release(struct kobject *kobj) | 28 | static void acpi_device_release(struct kobject *kobj) |
29 | { | 29 | { |
30 | struct acpi_device *dev = container_of(kobj, struct acpi_device, kobj); | 30 | struct acpi_device *dev = container_of(kobj, struct acpi_device, kobj); |
31 | if (dev->pnp.cid_list) | 31 | kfree(dev->pnp.cid_list); |
32 | kfree(dev->pnp.cid_list); | ||
33 | kfree(dev); | 32 | kfree(dev); |
34 | } | 33 | } |
35 | 34 | ||
@@ -1111,14 +1110,13 @@ acpi_add_single_object(struct acpi_device **child, | |||
1111 | * | 1110 | * |
1112 | * TBD: Assumes LDM provides driver hot-plug capability. | 1111 | * TBD: Assumes LDM provides driver hot-plug capability. |
1113 | */ | 1112 | */ |
1114 | result = acpi_bus_find_driver(device); | 1113 | acpi_bus_find_driver(device); |
1115 | 1114 | ||
1116 | end: | 1115 | end: |
1117 | if (!result) | 1116 | if (!result) |
1118 | *child = device; | 1117 | *child = device; |
1119 | else { | 1118 | else { |
1120 | if (device->pnp.cid_list) | 1119 | kfree(device->pnp.cid_list); |
1121 | kfree(device->pnp.cid_list); | ||
1122 | kfree(device); | 1120 | kfree(device); |
1123 | } | 1121 | } |
1124 | 1122 | ||