Re: [PATCH 3/4] ata: Fix acpi_bus_get_device() return value check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/20/2013 05:28 PM, Yijing Wang wrote:
> 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 <wangyijing@xxxxxxxxxx>
> Cc: Tejun Heo <tj@xxxxxxxxxx>
> Cc: linux-ide@xxxxxxxxxxxxxxx

Acked-by: Aaron Lu <aaron.lu@xxxxxxxxx>

Thanks,
Aaron

> ---
>  drivers/ata/libata-zpodd.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/ata/libata-zpodd.c b/drivers/ata/libata-zpodd.c
> index 68f9e32..3d9f82d 100644
> --- a/drivers/ata/libata-zpodd.c
> +++ b/drivers/ata/libata-zpodd.c
> @@ -95,8 +95,7 @@ static bool odd_can_poweroff(struct ata_device *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);
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux