ata: Fix acpi_bus_get_device() return value check
PATCH v2 1/1 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.
Signed-off-by Yijing Wang <[email protected]>
---v1->v2: remove the unused variable status found by linux-next kbuild test.
--- drivers/ata/libata-zpodd.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
drivers/ata/libata-zpodd.c +1 -3
@@ -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);
Signature · 1 line
1.7.1