diff mbox series

[linux-next] scsi: scsi_error.c: Remove the unneeded result variable

Message ID 20220831033528.302249-1-ye.xingchen@zte.com.cn (mailing list archive)
State Deferred
Headers show
Series [linux-next] scsi: scsi_error.c: Remove the unneeded result variable | expand

Commit Message

CGEL Aug. 31, 2022, 3:35 a.m. UTC
From: ye xingchen <ye.xingchen@zte.com.cn>

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

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

Patch

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);