Re: [PATCH] usb: gadget: u_serial: fix coverity warning: negative index at array

2020-05-14 Thread Alan Stern
On Thu, May 14, 2020 at 04:05:00PM +0800, Macpaul Lin wrote: > This issue has been reported by coverity scanner. > Replace "int portnum" by "unsigned int", this void negative index at > array. Can you please explain this more fully? Why does coverity think the code might use a negative array

Re: [PATCH] usb: gadget: u_serial: fix coverity warning: negative index at array

2020-05-14 Thread Felipe Balbi
ch failed: drivers/usb/gadget/function/u_serial.c:587 error: drivers/usb/gadget/function/u_serial.c: patch does not apply hint: Use 'git am --show-current-patch=diff' to see the failed patch Applying: usb: gadget: u_serial: fix coverity warning: negative index at array Patch failed at 0001 usb:

[PATCH] usb: gadget: u_serial: fix coverity warning: negative index at array

2020-05-14 Thread Macpaul Lin
This issue has been reported by coverity scanner. Replace "int portnum" by "unsigned int", this void negative index at array. Signed-off-by: Stan Lu Signed-off-by: Macpaul Lin --- drivers/usb/gadget/function/u_serial.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git