diff mbox series

drivers/scsi: remove redundant error variable

Message ID 20220104112452.601899-1-chi.minghao@zte.com.cn (mailing list archive)
State Accepted
Headers show
Series drivers/scsi: remove redundant error variable | expand

Commit Message

CGEL Jan. 4, 2022, 11:24 a.m. UTC
From: Minghao Chi <chi.minghao@zte.com.cn>

Return value from ahd_linux_queue_abort_cmd() directly instead
of taking this in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
---
 drivers/scsi/aic7xxx/aic79xx_osm.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Comments

Martin K. Petersen Jan. 10, 2022, 10:04 p.m. UTC | #1
On Tue, 4 Jan 2022 11:24:52 +0000, cgel.zte@gmail.com wrote:

> From: Minghao Chi <chi.minghao@zte.com.cn>
> 
> Return value from ahd_linux_queue_abort_cmd() directly instead
> of taking this in another redundant variable.
> 
> 

Applied to 5.17/scsi-queue, thanks!

[1/1] drivers/scsi: remove redundant error variable
      https://git.kernel.org/mkp/scsi/c/c3b48443ba7c
diff mbox series

Patch

diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c
index 5d566d2b2997..928099163f0f 100644
--- a/drivers/scsi/aic7xxx/aic79xx_osm.c
+++ b/drivers/scsi/aic7xxx/aic79xx_osm.c
@@ -755,11 +755,7 @@  ahd_linux_biosparam(struct scsi_device *sdev, struct block_device *bdev,
 static int
 ahd_linux_abort(struct scsi_cmnd *cmd)
 {
-	int error;
-	
-	error = ahd_linux_queue_abort_cmd(cmd);
-
-	return error;
+	return ahd_linux_queue_abort_cmd(cmd);
 }
 
 /*