On Fri, Jul 15, 2016 at 02:15:47PM +0300, Dan Carpenter wrote:
> We can't assign -EINVAL to a u16.
> 
> Fixes: 3948f0e0c999 ('usb: add Freescale QE/CPM USB peripheral controller 
> driver')
> Signed-off-by: Dan Carpenter <[email protected]>
> 
> diff --git a/drivers/usb/gadget/udc/fsl_qe_udc.c 
> b/drivers/usb/gadget/udc/fsl_qe_udc.c
> index 93d28cb..901366f 100644
> --- a/drivers/usb/gadget/udc/fsl_qe_udc.c
> +++ b/drivers/usb/gadget/udc/fsl_qe_udc.c
> @@ -1878,11 +1878,8 @@ static int qe_get_frame(struct usb_gadget *gadget)
>  
>       tmp = in_be16(&udc->usb_param->frame_n);
>       if (tmp & 0x8000)
> -             tmp = tmp & 0x07ff;
> -     else
> -             tmp = -EINVAL;
> -
> -     return (int)tmp;
> +             return tmp & 0x07ff;
> +     return -EINVAL;
>  }

Acked-by: Peter Chen <[email protected]>
>  
>  static int fsl_qe_start(struct usb_gadget *gadget,
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 

Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to