summaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-zpodd.c
diff options
context:
space:
mode:
authorYijing Wang <wangyijing@huawei.com>2013-11-20 10:28:25 +0100
committerTejun Heo <tj@kernel.org>2013-11-23 14:37:10 +0100
commite2fc623e7dda6004cf24ec1470c5a8cc6e1a05e3 (patch)
tree41d25ceb89e0736ae1931be713e3271dad21750f /drivers/ata/libata-zpodd.c
parentpata_arasan_cf: add missing clk_disable_unprepare() on error path (diff)
downloadlinux-e2fc623e7dda6004cf24ec1470c5a8cc6e1a05e3.tar.xz
linux-e2fc623e7dda6004cf24ec1470c5a8cc6e1a05e3.zip
ata: fix acpi_bus_get_device() return value check
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 <wangyijing@huawei.com> Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Aaron Lu <aaron.lu@intel.com> Cc: linux-ide@vger.kernel.org Cc: kbuild test robot <fengguang.wu@intel.com>
Diffstat (limited to 'drivers/ata/libata-zpodd.c')
-rw-r--r--drivers/ata/libata-zpodd.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/ata/libata-zpodd.c b/drivers/ata/libata-zpodd.c
index 68f9e3293e9c..88949c6d55dd 100644
--- a/drivers/ata/libata-zpodd.c
+++ b/drivers/ata/libata-zpodd.c
@@ -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);