Linux USB
 help / color / mirror / Atom feed
From: cgel.zte@gmail.com
To: stern@rowland.harvard.edu, skhan@linuxfoundation.org,
	richard.leitner@skidata.com, tasos@tasossah.com
Cc: wsa+renesas@sang-engineering.com, ingo.rohloff@lauterbach.com,
	cui.jinpeng2@zte.com.cn, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, Zeal Robot <zealci@zte.com.cn>
Subject: [PATCH linux-next] usb: core: remove redundant variables ret
Date: Tue, 30 Aug 2022 14:33:18 +0000	[thread overview]
Message-ID: <20220830143318.299640-1-cui.jinpeng2@zte.com.cn> (raw)

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


             reply	other threads:[~2022-08-30 14:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-30 14:33 cgel.zte [this message]
2022-08-30 15:24 ` [PATCH linux-next] usb: core: remove redundant variables ret Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220830143318.299640-1-cui.jinpeng2@zte.com.cn \
    --to=cgel.zte@gmail.com \
    --cc=cui.jinpeng2@zte.com.cn \
    --cc=ingo.rohloff@lauterbach.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=richard.leitner@skidata.com \
    --cc=skhan@linuxfoundation.org \
    --cc=stern@rowland.harvard.edu \
    --cc=tasos@tasossah.com \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=zealci@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox