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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200703174148.2749969-20-lee.jones@linaro.org>
Date:   Fri,  3 Jul 2020 18:41:37 +0100
From:   Lee Jones <lee.jones@...aro.org>
To:     gregkh@...uxfoundation.org, linux-usb@...r.kernel.org
Cc:     linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Lee Jones <lee.jones@...aro.org>,
        Alan Stern <stern@...land.harvard.edu>,
        Daniel Drake <dsd@...too.org>,
        usb-storage@...ts.one-eyed-alien.net
Subject: [PATCH 19/30] usb: storage: alauda: Remove set but unchecked variable

The return value of alauda_get_media_status() hasn't been checked
since the driver's inception back in 2005.  If nothing have gone
wrong/been detected until this point, it's probably safe to just
remove the variable.

Fixes the following W=1 kernel build warning(s):

 drivers/usb/storage/alauda.c: In function ‘alauda_check_media’:
 drivers/usb/storage/alauda.c:456:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
 456 | int rc;
 | ^~

Cc: Alan Stern <stern@...land.harvard.edu>
Cc: Daniel Drake <dsd@...too.org>
Cc: usb-storage@...ts.one-eyed-alien.net
Signed-off-by: Lee Jones <lee.jones@...aro.org>
---
 drivers/usb/storage/alauda.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/usb/storage/alauda.c b/drivers/usb/storage/alauda.c
index ddab2cd3d2e75..20b857e97e60c 100644
--- a/drivers/usb/storage/alauda.c
+++ b/drivers/usb/storage/alauda.c
@@ -453,9 +453,8 @@ static int alauda_check_media(struct us_data *us)
 {
 	struct alauda_info *info = (struct alauda_info *) us->extra;
 	unsigned char status[2];
-	int rc;
 
-	rc = alauda_get_media_status(us, status);
+	alauda_get_media_status(us, status);
 
 	/* Check for no media or door open */
 	if ((status[0] & 0x80) || ((status[0] & 0x1F) == 0x10)
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ