From: Lee Jones Date: Fri, 3 Jul 2020 17:41:37 +0000 (+0100) Subject: usb: storage: alauda: Remove set but unchecked variable X-Git-Tag: v5.10.7~1952^2~152 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7565fce17d19d9f0ab9062cb30653608d5d0cfad;p=platform%2Fkernel%2Flinux-rpi.git 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 Cc: Daniel Drake Cc: usb-storage@lists.one-eyed-alien.net Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200703174148.2749969-20-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/storage/alauda.c b/drivers/usb/storage/alauda.c index ddab2cd..20b857e 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)