linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] scsi: scsi_error.c: Remove the unneeded result variable
@ 2022-08-31  3:35 cgel.zte
  0 siblings, 0 replies; only message in thread
From: cgel.zte @ 2022-08-31  3:35 UTC (permalink / raw)
  To: jejb; +Cc: martin.petersen, linux-scsi, linux-kernel, ye xingchen, Zeal Robot

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-31  3:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-31  3:35 [PATCH linux-next] scsi: scsi_error.c: Remove the unneeded result variable cgel.zte

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).