From: Zeeshan Ahmad Date: Fri, 6 Mar 2026 09:06:43 +0000 (+0500) Subject: usb: dwc3: gadget: use explicit 0 for success in __dwc3_gadget_kick_transfer() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79a860ad214d034d1a5be8dc83811bd97e9aafb4;p=thirdparty%2Flinux.git usb: dwc3: gadget: use explicit 0 for success in __dwc3_gadget_kick_transfer() Smatch warns that __dwc3_gadget_kick_transfer() might be missing an error code when returning 'ret' at line 1691. While 'ret' is guaranteed to be 0 at this point, returning an explicit 0 improves readability by removing a level of indirection and clarifies the intent that this is a successful "no-op" path. This change also silences the Smatch warning. Suggested-by: Dan Carpenter Signed-off-by: Zeeshan Ahmad Acked-by: Thinh Nguyen Link: https://patch.msgid.link/20260306090643.47383-1-zeeshanahmad022019@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 0a688904ce8c..3d4ca68e584c 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1688,7 +1688,7 @@ static int __dwc3_gadget_kick_transfer(struct dwc3_ep *dep) * transfer, there's no need to update the transfer. */ if (!ret && !starting) - return ret; + return 0; req = next_request(&dep->started_list); if (!req) {