Re: [PATCH -next] usb: gadget: tcm_usb_gadge: fix to return error or 0 in tcm_usbg_drop_nexus()

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

 



Hi,

On Tue, Nov 13, 2012 at 08:01:13PM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>
> 
> In the error handling case of tcm_usbg_drop_nexus(), the error code
> is assigned to 'ret', but it is ingored. We'd better return 'ret'

typo here: ignored.

> instead of always return 0.
> 
> dpatch engine is used to auto generate this patch.
> (https://github.com/weiyj/dpatch)
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>
> ---
>  drivers/usb/gadget/tcm_usb_gadget.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/tcm_usb_gadget.c b/drivers/usb/gadget/tcm_usb_gadget.c
> index 4f7f76f..7cacd6a 100644
> --- a/drivers/usb/gadget/tcm_usb_gadget.c
> +++ b/drivers/usb/gadget/tcm_usb_gadget.c
> @@ -1794,9 +1794,10 @@ static int tcm_usbg_drop_nexus(struct usbg_tpg *tpg)
>  	tpg->tpg_nexus = NULL;
>  
>  	kfree(tv_nexus);
> +	ret = 0;
>  out:
>  	mutex_unlock(&tpg->tpg_mutex);
> -	return 0;
> +	return ret;
>  }
>  
>  static ssize_t tcm_usbg_tpg_store_nexus(

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux