[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<KL1PR0601MB5773E73C0161E6222E55E1D8E65E2@KL1PR0601MB5773.apcprd06.prod.outlook.com>
Date: Sat, 9 Nov 2024 01:32:43 +0000
From: Rex Nie <rex.nie@...uarmicro.com>
To: Alan Stern <stern@...land.harvard.edu>
CC: "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Angus Chen
<angus.chen@...uarmicro.com>, "stable@...r.kernel.org"
<stable@...r.kernel.org>
Subject:
答复: [PATCH] USB: core: remove dead code in do_proc_bulk()
HI Alan,
Thanks for your code review.
Rex
> -----邮件原件-----
> 发件人: Alan Stern <stern@...land.harvard.edu>
> 发送时间: 2024年11月8日 22:09
> 收件人: Rex Nie <rex.nie@...uarmicro.com>
> 抄送: gregkh@...uxfoundation.org; linux-usb@...r.kernel.org;
> linux-kernel@...r.kernel.org; Angus Chen <angus.chen@...uarmicro.com>;
> stable@...r.kernel.org
> 主题: Re: [PATCH] USB: core: remove dead code in do_proc_bulk()
>
> External Mail: This email originated from OUTSIDE of the organization!
> Do not click links, open attachments or provide ANY information unless you
> recognize the sender and know the content is safe.
>
>
> On Fri, Nov 08, 2024 at 05:42:55PM +0800, Rex Nie wrote:
> > Since len1 is unsigned int, len1 < 0 always false. Remove it keep code
> > simple.
> >
> > Signed-off-by: Rex Nie <rex.nie@...uarmicro.com>
>
> Acked-by: Alan Stern <stern@...land.harvard.edu>
>
> > ---
> > drivers/usb/core/devio.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index
> > 3beb6a862e80..712e290bab04 100644
> > --- a/drivers/usb/core/devio.c
> > +++ b/drivers/usb/core/devio.c
> > @@ -1295,7 +1295,7 @@ static int do_proc_bulk(struct usb_dev_state *ps,
> > return ret;
> >
> > len1 = bulk->len;
> > - if (len1 < 0 || len1 >= (INT_MAX - sizeof(struct urb)))
> > + if (len1 >= (INT_MAX - sizeof(struct urb)))
> > return -EINVAL;
> >
> > if (bulk->ep & USB_DIR_IN)
> > --
> > 2.17.1
> >
> >
Powered by blists - more mailing lists