All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [patch 3/6] usb: gadget: uvc: remove an impossible condition
Date: Fri, 16 Jan 2015 11:18:54 +0000	[thread overview]
Message-ID: <54B8F39E.8080809@samsung.com> (raw)
In-Reply-To: <20150114210218.GC23203@mwanda>

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
>


  reply	other threads:[~2015-01-16 11:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-14 21:02 [patch 3/6] usb: gadget: uvc: remove an impossible condition Dan Carpenter
2015-01-16 11:18 ` Andrzej Pietrasiewicz [this message]
2015-01-18 23:54 ` Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54B8F39E.8080809@samsung.com \
    --to=andrzej.p@samsung.com \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.