On Tue, Aug 11, 2015 at 02:16:59PM -0500, Felipe Balbi wrote: > On Tue, Aug 11, 2015 at 10:13:40PM +0300, Dan Carpenter wrote: > > Hello Yu Xu, > > > > The patch 3d4eb9dfa3e8: "usb: gadget: mv: Add USB 3.0 device driver > > for Marvell PXA2128 chip." from Jun 15, 2012, leads to the following > > static checker warning: > > > > drivers/usb/gadget/udc/mv_u3d_core.c:1668 mv_u3d_irq_process_tr_complete() > > warn: 'status' can be either negative or positive > > > > drivers/usb/gadget/udc/mv_u3d_core.c > > 1664 /* process the req queue until an uncomplete request */ > > 1665 list_for_each_entry_safe(curr_req, temp_req, > > 1666 &curr_ep->queue, queue) { > > 1667 status = mv_u3d_process_ep_req(u3d, i, curr_req); > > 1668 if (status) > > > > Probably if (status < 0) was intended > > I'd say a better fix would be to guarantee that mv_u3d_process_ep_req() > only returns 0 or negative errno. > I think you are probably right... It's weird how we set curr_req->req.status = status; on the next line. The mv_u3d_done(curr_ep, curr_req, status); checks curr_req->req.status and status for errors as well but we have erased them. Also this one is the a copy of this code. drivers/usb/gadget/udc/mv_udc_core.c:1831 irq_process_tr_complete() warn: 'status' can be either negative or positive regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html