mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 03:11:11 -04:00
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 <dan.carpenter@linaro.org> Signed-off-by: Zeeshan Ahmad <zeeshanahmad022019@gmail.com> Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://patch.msgid.link/20260306090643.47383-1-zeeshanahmad022019@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
7afa83a7a8
commit
79a860ad21
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user