linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers/net/usb: remove redundant ret variable
@ 2022-01-12  8:02 cgel.zte
  0 siblings, 0 replies; only message in thread
From: cgel.zte @ 2022-01-12  8:02 UTC (permalink / raw)
  To: davem
  Cc: kuba, linux-usb, netdev, linux-kernel, Minghao Chi, Zeal Robot, CGEL ZTE

From: Minghao Chi <chi.minghao@zte.com.cn>

Return value from __aqc111_write_cmd() directly instead
of taking this in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
---
 drivers/net/usb/aqc111.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/net/usb/aqc111.c b/drivers/net/usb/aqc111.c
index ea06d10e1c21..22b5d84abe3c 100644
--- a/drivers/net/usb/aqc111.c
+++ b/drivers/net/usb/aqc111.c
@@ -110,12 +110,8 @@ static int __aqc111_write_cmd(struct usbnet *dev, u8 cmd, u8 reqtype,
 static int aqc111_write_cmd_nopm(struct usbnet *dev, u8 cmd, u16 value,
 				 u16 index, u16 size, void *data)
 {
-	int ret;
-
-	ret = __aqc111_write_cmd(dev, cmd, USB_DIR_OUT | USB_TYPE_VENDOR |
+	return  __aqc111_write_cmd(dev, cmd, USB_DIR_OUT | USB_TYPE_VENDOR |
 				 USB_RECIP_DEVICE, value, index, size, data);
-
-	return ret;
 }
 
 static int aqc111_write_cmd(struct usbnet *dev, u8 cmd, u16 value,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-12  8:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-12  8:02 [PATCH] drivers/net/usb: remove redundant ret variable cgel.zte

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).