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: <20210529061729.2824082-1-libaokun1@huawei.com>
Date:   Sat, 29 May 2021 14:17:29 +0800
From:   Baokun Li <libaokun1@...wei.com>
To:     <davem@...emloft.net>, <linux-ide@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
CC:     <weiyongjun1@...wei.com>, <yuehaibing@...wei.com>,
        <yangjihong1@...wei.com>, <yukuai3@...wei.com>,
        <libaokun1@...wei.com>
Subject: [PATCH -next] ide-cd: fix warning: variable 'stat' set but not used

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/ide/ide-cd_ioctl.c: In function 'ide_cdrom_select_speed':
drivers/ide/ide-cd_ioctl.c:212:6: warning:
 variable ‘stat’ set but not used [-Wunused-but-set-variable]

It never used since introduction.

Signed-off-by: Baokun Li <libaokun1@...wei.com>
---
 drivers/ide/ide-cd_ioctl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/ide/ide-cd_ioctl.c b/drivers/ide/ide-cd_ioctl.c
index 011eab9c69b7..8d0a52123349 100644
--- a/drivers/ide/ide-cd_ioctl.c
+++ b/drivers/ide/ide-cd_ioctl.c
@@ -231,6 +231,8 @@ int ide_cdrom_select_speed(struct cdrom_device_info *cdi, int speed)
 	}
 
 	stat = ide_cd_queue_pc(drive, cmd, 0, NULL, NULL, NULL, 0, 0);
+	if (stat)
+		return stat;
 
 	if (!ide_cdrom_get_capabilities(drive, buf)) {
 		ide_cdrom_update_speed(drive, buf);
-- 
2.25.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ