ata: fix acpi_bus_get_device() return value check
authorYijing Wang <[email protected]>
Wed, 20 Nov 2013 09:28:25 +0000 (17:28 +0800)
committerTejun Heo <[email protected]>
Sat, 23 Nov 2013 13:37:10 +0000 (08:37 -0500)
Since acpi_bus_get_device() returns plain int and not acpi_status,
ACPI_FAILURE() should not be used for checking its return value.  Fix
that.

tj: Dropped unused local variable @status from odd_can_poweroff().
    Reported by kbuild test bot.

Signed-off-by: Yijing Wang <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>
Acked-by: Aaron Lu <[email protected]>
Cc: [email protected]
Cc: kbuild test robot <[email protected]>
drivers/ata/libata-zpodd.c

index 68f9e3293e9c62971486937d6a5048c58b1a056c..88949c6d55ddd43b32b07accdb892256028d5e25 100644 (file)
@@ -88,15 +88,13 @@ static enum odd_mech_type zpodd_get_mech_type(struct ata_device *dev)
 static bool odd_can_poweroff(struct ata_device *ata_dev)
 {
        acpi_handle handle;
-       acpi_status status;
        struct acpi_device *acpi_dev;
 
        handle = ata_dev_acpi_handle(ata_dev);
        if (!handle)
                return false;
 
-       status = acpi_bus_get_device(handle, &acpi_dev);
-       if (ACPI_FAILURE(status))
+       if (acpi_bus_get_device(handle, &acpi_dev))
                return false;
 
        return acpi_device_can_poweroff(acpi_dev);