Re: [PATCH] usb: gadget: net2272: assert for a valid dma request

2020-08-30 Thread Greg KH
On Sun, Aug 30, 2020 at 11:36:46AM -0700, t...@redhat.com wrote: > From: Tom Rix > > clang static analysis flags this representive problem > > net2272.c:1541:8: warning: Dereference of null pointer > if ((req->req.length % ep->ep.maxpacket != 0) || > ^~~ > This is mostly

Re: [PATCH] usb: gadget: net2272: assert for a valid dma request

2020-08-30 Thread Tom Rix
On 8/30/20 2:22 PM, Alan Stern wrote: > On Sun, Aug 30, 2020 at 11:36:46AM -0700, t...@redhat.com wrote: >> From: Tom Rix >> >> clang static analysis flags this representive problem >> >> net2272.c:1541:8: warning: Dereference of null pointer >> if ((req->req.length % ep->ep.maxpacket != 0)

Re: [PATCH] usb: gadget: net2272: assert for a valid dma request

2020-08-30 Thread Alan Stern
On Sun, Aug 30, 2020 at 11:36:46AM -0700, t...@redhat.com wrote: > From: Tom Rix > > clang static analysis flags this representive problem > > net2272.c:1541:8: warning: Dereference of null pointer > if ((req->req.length % ep->ep.maxpacket != 0) || > ^~~ > This is mostly

[PATCH] usb: gadget: net2272: assert for a valid dma request

2020-08-30 Thread trix
From: Tom Rix clang static analysis flags this representive problem net2272.c:1541:8: warning: Dereference of null pointer if ((req->req.length % ep->ep.maxpacket != 0) || ^~~ This is mostly not a problem. In net2272_handle_dma(), even though every path through the rout