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: <20220104112818.602025-1-chi.minghao@zte.com.cn>
Date:   Tue,  4 Jan 2022 11:28:18 +0000
From:   cgel.zte@...il.com
To:     jdelvare@...e.com
Cc:     linux@...ck-us.net, linux-hwmon@...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/hwmon: remove redundant res variable

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

Return value from inb_p() 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/hwmon/nct6683.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/hwmon/nct6683.c b/drivers/hwmon/nct6683.c
index 6a9f420e7d32..ab02e967f73d 100644
--- a/drivers/hwmon/nct6683.c
+++ b/drivers/hwmon/nct6683.c
@@ -495,13 +495,10 @@ static inline long in_from_reg(u16 reg, u8 src)
 
 static u16 nct6683_read(struct nct6683_data *data, u16 reg)
 {
-	int res;
-
 	outb_p(0xff, data->addr + EC_PAGE_REG);		/* unlock */
 	outb_p(reg >> 8, data->addr + EC_PAGE_REG);
 	outb_p(reg & 0xff, data->addr + EC_INDEX_REG);
-	res = inb_p(data->addr + EC_DATA_REG);
-	return res;
+	return inb_p(data->addr + EC_DATA_REG);
 }
 
 static u16 nct6683_read16(struct nct6683_data *data, u16 reg)
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ