Re: [PATCH] f_uac1: check return code from config_ep_by_speed

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

 



On Mon, May 18, 2015 at 02:58:22PM +0200, Michael Trimarchi wrote:
> Signed-off-by: Michael Trimarchi <michael@xxxxxxxxxxxxxxxxxxxx>

you need a commit log, even if it appears obvious now, it might not be
10 years from now.

Also, since you're respinning anyway, subject would be nicer as:

usb: gadget: f_uac1: check return code from config_ep_by_speed()

cheers

> ---
>  drivers/usb/gadget/function/f_uac1.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/function/f_uac1.c b/drivers/usb/gadget/function/f_uac1.c
> index 9719abf..7856b33 100644
> --- a/drivers/usb/gadget/function/f_uac1.c
> +++ b/drivers/usb/gadget/function/f_uac1.c
> @@ -588,7 +588,10 @@ static int f_audio_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
>  
>  	if (intf == 1) {
>  		if (alt == 1) {
> -			config_ep_by_speed(cdev->gadget, f, out_ep);
> +			err = config_ep_by_speed(cdev->gadget, f, out_ep);
> +			if (err)
> +				return err;
> +
>  			usb_ep_enable(out_ep);
>  			out_ep->driver_data = audio;
>  			audio->copy_buf = f_audio_buffer_alloc(audio_buf_size);
> -- 
> 1.9.1
> 

-- 
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