Linux USB
 help / color / mirror / Atom feed
* [PATCH linux-next] usb: core: remove redundant variables ret
@ 2022-08-30 14:33 cgel.zte
  2022-08-30 15:24 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2022-08-30 14:33 UTC (permalink / raw)
  To: stern, skhan, richard.leitner, tasos
  Cc: wsa+renesas, ingo.rohloff, cui.jinpeng2, linux-usb, linux-kernel,
	Zeal Robot

From: Jinpeng Cui <cui.jinpeng2@zte.com.cn>

Rturn value directly from usbdev_do_ioctl() instead of
getting value from redundant variable ret.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
---
 drivers/usb/core/devio.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 837f3e57f580..043d934ead83 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -2802,11 +2802,8 @@ static long usbdev_do_ioctl(struct file *file, unsigned int cmd,
 static long usbdev_ioctl(struct file *file, unsigned int cmd,
 			unsigned long arg)
 {
-	int ret;
-
-	ret = usbdev_do_ioctl(file, cmd, (void __user *)arg);
 
-	return ret;
+	return usbdev_do_ioctl(file, cmd, (void __user *)arg);
 }
 
 /* No kernel lock - fine */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-30 15:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-30 14:33 [PATCH linux-next] usb: core: remove redundant variables ret cgel.zte
2022-08-30 15:24 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox