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>] [day] [month] [year] [list]
Message-Id: <20220112080238.666933-1-chi.minghao@zte.com.cn>
Date:   Wed, 12 Jan 2022 08:02:38 +0000
From:   cgel.zte@...il.com
To:     davem@...emloft.net
Cc:     kuba@...nel.org, linux-usb@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, Minghao Chi <chi.minghao@....com.cn>,
        Zeal Robot <zealci@....com.cn>, CGEL ZTE <cgel.zte@...il.com>
Subject: [PATCH] drivers/net/usb: remove redundant ret variable

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

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

Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Minghao Chi <chi.minghao@....com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ