All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 3/6] usb: gadget: uvc: remove an impossible condition
@ 2015-01-14 21:02 Dan Carpenter
  2015-01-16 11:18 ` Andrzej Pietrasiewicz
  2015-01-18 23:54 ` Laurent Pinchart
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2015-01-14 21:02 UTC (permalink / raw)
  To: kernel-janitors

"num" is a u32 so "(num > 0xFFFFFFFF)" is never true.  Also the range
is already checked in kstrtou32().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/usb/gadget/function/uvc_configfs.c b/drivers/usb/gadget/function/uvc_configfs.c
index 2bd0688..738d68f 100644
--- a/drivers/usb/gadget/function/uvc_configfs.c
+++ b/drivers/usb/gadget/function/uvc_configfs.c
@@ -1156,8 +1156,6 @@ static inline int __uvcg_fill_frm_intrv(char *buf, void *priv)
 	ret = kstrtou32(buf, 0, &num);
 	if (ret)
 		return ret;
-	if (num > 0xFFFFFFFF)
-		return -EINVAL;
 
 	interv = priv;
 	**interv = cpu_to_le32(num);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [patch 3/6] usb: gadget: uvc: remove an impossible condition
  2015-01-14 21:02 [patch 3/6] usb: gadget: uvc: remove an impossible condition Dan Carpenter
@ 2015-01-16 11:18 ` Andrzej Pietrasiewicz
  2015-01-18 23:54 ` Laurent Pinchart
  1 sibling, 0 replies; 3+ messages in thread
From: Andrzej Pietrasiewicz @ 2015-01-16 11:18 UTC (permalink / raw)
  To: kernel-janitors

W dniu 14.01.2015 o 22:02, Dan Carpenter pisze:
> "num" is a u32 so "(num > 0xFFFFFFFF)" is never true.  Also the range
> is already checked in kstrtou32().
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>

Acked-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>

> diff --git a/drivers/usb/gadget/function/uvc_configfs.c b/drivers/usb/gadget/function/uvc_configfs.c
> index 2bd0688..738d68f 100644
> --- a/drivers/usb/gadget/function/uvc_configfs.c
> +++ b/drivers/usb/gadget/function/uvc_configfs.c
> @@ -1156,8 +1156,6 @@ static inline int __uvcg_fill_frm_intrv(char *buf, void *priv)
>   	ret = kstrtou32(buf, 0, &num);
>   	if (ret)
>   		return ret;
> -	if (num > 0xFFFFFFFF)
> -		return -EINVAL;
>
>   	interv = priv;
>   	**interv = cpu_to_le32(num);
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch 3/6] usb: gadget: uvc: remove an impossible condition
  2015-01-14 21:02 [patch 3/6] usb: gadget: uvc: remove an impossible condition Dan Carpenter
  2015-01-16 11:18 ` Andrzej Pietrasiewicz
@ 2015-01-18 23:54 ` Laurent Pinchart
  1 sibling, 0 replies; 3+ messages in thread
From: Laurent Pinchart @ 2015-01-18 23:54 UTC (permalink / raw)
  To: kernel-janitors

Hi Dan,

Thank you for the patch.

On Thursday 15 January 2015 00:02:18 Dan Carpenter wrote:
> "num" is a u32 so "(num > 0xFFFFFFFF)" is never true.  Also the range
> is already checked in kstrtou32().
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> diff --git a/drivers/usb/gadget/function/uvc_configfs.c
> b/drivers/usb/gadget/function/uvc_configfs.c index 2bd0688..738d68f 100644
> --- a/drivers/usb/gadget/function/uvc_configfs.c
> +++ b/drivers/usb/gadget/function/uvc_configfs.c
> @@ -1156,8 +1156,6 @@ static inline int __uvcg_fill_frm_intrv(char *buf,
> void *priv) ret = kstrtou32(buf, 0, &num);
>  	if (ret)
>  		return ret;
> -	if (num > 0xFFFFFFFF)
> -		return -EINVAL;
> 
>  	interv = priv;
>  	**interv = cpu_to_le32(num);

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-01-18 23:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-14 21:02 [patch 3/6] usb: gadget: uvc: remove an impossible condition Dan Carpenter
2015-01-16 11:18 ` Andrzej Pietrasiewicz
2015-01-18 23:54 ` Laurent Pinchart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.