lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220912103700.18338-1-xu.panda@zte.com.cn>
Date:   Mon, 12 Sep 2022 10:37:01 +0000
From:   cgel.zte@...il.com
To:     balbi@...nel.org
Cc:     linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
        Xu Panda <xu.panda@....com.cn>, Zeal Robot <zealci@....com.cn>
Subject: [PATCH linux-next] USB: serial: keyspan_pda: remove the unneeded result variable

From: Xu Panda <xu.panda@....com.cn>

Return the usb_control_msg() directly instead of storing it in
another redundant variable.

Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Xu Panda <xu.panda@....com.cn>
---
 drivers/usb/serial/keyspan_pda.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c
index 6fd15cd9e1eb..902675ac7f5c 100644
--- a/drivers/usb/serial/keyspan_pda.c
+++ b/drivers/usb/serial/keyspan_pda.c
@@ -393,12 +393,10 @@ static int keyspan_pda_get_modem_info(struct usb_serial *serial,
 static int keyspan_pda_set_modem_info(struct usb_serial *serial,
                                      unsigned char value)
 {
-       int rc;
-       rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
-                            3, /* set pins */
-                            USB_TYPE_VENDOR|USB_RECIP_INTERFACE|USB_DIR_OUT,
-                            value, 0, NULL, 0, 2000);
-       return rc;
+       return usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
+                              3, /* set pins */
+                              USB_TYPE_VENDOR|USB_RECIP_INTERFACE|USB_DIR_OUT,
+                              value, 0, NULL, 0, 2000);
 }

 static int keyspan_pda_tiocmget(struct tty_struct *tty)
-- 
2.15.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ