2022-08-31 03:47:12

by CGEL

[permalink] [raw]
Subject: [PATCH linux-next] scsi: scsi_error.c: Remove the unneeded result variable

From: ye xingchen <[email protected]>

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

Reported-by: Zeal Robot <[email protected]>
Signed-off-by: ye xingchen <[email protected]>
---
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