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: <20210324072031.941791-1-xujia39@huawei.com>
Date:   Wed, 24 Mar 2021 15:20:31 +0800
From:   Xu Jia <xujia39@...wei.com>
To:     <gregkh@...uxfoundation.org>, <arnd@...db.de>
CC:     <linux-kernel@...r.kernel.org>
Subject: [PATCH -next] applicom: fix some err codes returned by ac_ioctl

When cmd > 6 or copy_to_user() fail, The variable 'ret' would not be 
returned back. Fix the 'ret' set but not used.

Signed-off-by: Xu Jia <xujia39@...wei.com>
---
 drivers/char/applicom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/applicom.c b/drivers/char/applicom.c
index 14b2d8034c51..0ab765143354 100644
--- a/drivers/char/applicom.c
+++ b/drivers/char/applicom.c
@@ -839,7 +839,7 @@ static long ac_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 	Dummy = readb(apbs[IndexCard].RamIO + VERS);
 	kfree(adgl);
 	mutex_unlock(&ac_mutex);
-	return 0;
+	return ret;
 
 err:
 	if (warncount) {
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ