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>] [day] [month] [year] [list]
Message-Id: <20220831033528.302249-1-ye.xingchen@zte.com.cn>
Date:   Wed, 31 Aug 2022 03:35:28 +0000
From:   cgel.zte@...il.com
To:     jejb@...ux.ibm.com
Cc:     martin.petersen@...cle.com, linux-scsi@...r.kernel.org,
        linux-kernel@...r.kernel.org, ye xingchen <ye.xingchen@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: [PATCH linux-next] scsi: scsi_error.c: Remove the unneeded result variable

From: ye xingchen <ye.xingchen@....com.cn>

Return the value scsi_device_online() directly instead of storing it in
another redundant variable.

Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: ye xingchen <ye.xingchen@....com.cn>
---
 drivers/scsi/scsi_error.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 448748e3fba5..6840bb4ab55f 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -377,13 +377,9 @@ enum blk_eh_timer_return scsi_timeout(struct request *req)
  */
 int scsi_block_when_processing_errors(struct scsi_device *sdev)
 {
-	int online;
-
 	wait_event(sdev->host->host_wait, !scsi_host_in_recovery(sdev->host));
 
-	online = scsi_device_online(sdev);
-
-	return online;
+	return scsi_device_online(sdev);
 }
 EXPORT_SYMBOL(scsi_block_when_processing_errors);
 
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ