On Wed, Mar 04, 2026 at 02:04:08PM +0500, Zeeshan Ahmad wrote: > Hi Dan, > > I am performing a logic audit of the DWC3 driver and encountered a > consistent Smatch warning in drivers/usb/dwc3/gadget.c that appears > to be a false positive. > > The warning: > drivers/usb/dwc3/gadget.c:1691 __dwc3_gadget_kick_transfer() warn: missing > error code? 'ret' > > The code: > 1680: ret = dwc3_prepare_trbs(dep); > 1681: if (ret < 0) > 1682: return ret; > ... > 1690: if (!ret && !starting) > 1691: return ret;
Just do "return 0;" It's more readable, since it removes a level of indirection and we don't have to think about what ret is. I always recall a discuss between my managers: Q: But if we do that then how will they know where the zero comes from? A: We'll make our zeroes will *extra* round. :P regards, dan carpenter
