Re: [PATCH 2/2] soundwire: Testing the wrong variable

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

 



On Tue, Jan 09, 2018 at 12:37:44PM +0300, Dan Carpenter wrote:
> We should be using "status2" here instead of "status".

This is already fixed by commit:

Author: Wei Yongjun <weiyongjun1@xxxxxxxxxx>
Date:   Mon Jan 8 22:22:44 2018 +0530

    soundwire: Fix typo in return value check of sdw_read()

    Fix the typo, 'status' should be instead of 'status2'.


> 
> Fixes: b0a9c37b0178 ("soundwire: Add slave status handling")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> 
> diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c
> index ac88031f7664..a5d41a4a1609 100644
> --- a/drivers/soundwire/bus.c
> +++ b/drivers/soundwire/bus.c
> @@ -741,10 +741,10 @@ static int sdw_handle_port_interrupt(struct sdw_slave *slave,
>  
>  		/* Read DPN interrupt again */
>  		status2 = sdw_read(slave, addr);
> -		if (status < 0) {
> +		if (status2 < 0) {
>  			dev_err(slave->bus->dev,
> -					"SDW_DPN_INT read failed:%d", status);
> -			return status;
> +					"SDW_DPN_INT read failed:%d", status2);
> +			return status2;
>  		}
>  		status &= status2;
>  

-- 
~Vinod
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux