]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/acpi/scan.c
[ACPI] ACPICA 20051117
[linux-2.6-omap-h63xx.git] / drivers / acpi / scan.c
index c6db591479de3e02504d40ac8e0cee2d2bebdeab..e332306ae2b9d6b21a703b4f533e2fd42dc7a8a0 100644 (file)
@@ -28,8 +28,7 @@ static int acpi_bus_trim(struct acpi_device *start, int rmdevice);
 static void acpi_device_release(struct kobject *kobj)
 {
        struct acpi_device *dev = container_of(kobj, struct acpi_device, kobj);
-       if (dev->pnp.cid_list)
-               kfree(dev->pnp.cid_list);
+       kfree(dev->pnp.cid_list);
        kfree(dev);
 }
 
@@ -845,7 +844,7 @@ static void acpi_device_set_id(struct acpi_device *device,
         * ----
         * Fix for the system root bus device -- the only root-level device.
         */
-       if ((parent == ACPI_ROOT_OBJECT) && (type == ACPI_BUS_TYPE_DEVICE)) {
+       if (((acpi_handle)parent == ACPI_ROOT_OBJECT) && (type == ACPI_BUS_TYPE_DEVICE)) {
                hid = ACPI_BUS_HID;
                strcpy(device->pnp.device_name, ACPI_BUS_DEVICE_NAME);
                strcpy(device->pnp.device_class, ACPI_BUS_CLASS);
@@ -1111,14 +1110,13 @@ acpi_add_single_object(struct acpi_device **child,
         *
         * TBD: Assumes LDM provides driver hot-plug capability.
         */
-       result = acpi_bus_find_driver(device);
+       acpi_bus_find_driver(device);
 
       end:
        if (!result)
                *child = device;
        else {
-               if (device->pnp.cid_list)
-                       kfree(device->pnp.cid_list);
+               kfree(device->pnp.cid_list);
                kfree(device);
        }