diff mbox series

[linux-next] usb: core: remove redundant variables ret

Message ID 20220830143318.299640-1-cui.jinpeng2@zte.com.cn (mailing list archive)
State New, archived
Headers show
Series [linux-next] usb: core: remove redundant variables ret | expand

Commit Message

CGEL Aug. 30, 2022, 2:33 p.m. UTC
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(-)

Comments

Greg KH Aug. 30, 2022, 3:24 p.m. UTC | #1
On Tue, Aug 30, 2022 at 02:33:18PM +0000, cgel.zte@gmail.com wrote:
> 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>

As stated before, please read the documentation for how to handle stuff
coming from research tools like this and properly document it in your
changelog text.

Also, why is this being sent from a gmail account?  How do we know this
is really from a zte.com.cn address?

thanks,

greg k-h
diff mbox series

Patch

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 */