public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux-next] USB: serial: keyspan_pda: remove the unneeded result variable
@ 2022-09-12 10:37 cgel.zte
  2022-09-12 14:08 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2022-09-12 10:37 UTC (permalink / raw)
  To: balbi; +Cc: linux-usb, linux-kernel, Xu Panda, Zeal Robot

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

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

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Xu Panda <xu.panda@zte.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


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

end of thread, other threads:[~2022-09-12 14:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-12 10:37 [PATCH linux-next] USB: serial: keyspan_pda: remove the unneeded result variable cgel.zte
2022-09-12 14:08 ` Greg KH

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