lkml.org 
[lkml]   [2022]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH linux-next] usb: core: remove redundant variables ret
Date
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
\
 
 \ /
  Last update: 2022-08-30 16:34    [W:0.254 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site