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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: ye xingchen <ye.xingchen@xxxxxxxxxx>

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

Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
Signed-off-by: ye xingchen <ye.xingchen@xxxxxxxxxx>
---
 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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux