scsi: bfa: remove redundant assignment to variable error
diff mbox series

Message ID 20190731221152.15304-1-colin.king@canonical.com
State Accepted
Headers show
Series
  • scsi: bfa: remove redundant assignment to variable error
Related show

Commit Message

Colin King July 31, 2019, 10:11 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Variable error is being initialized with a value that is never read
and error is being re-assigned a little later on. The assignment is
redundant and hence can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/scsi/bfa/bfad_im.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Martin K. Petersen Aug. 29, 2019, 9:41 p.m. UTC | #1
Colin,

> Variable error is being initialized with a value that is never read
> and error is being re-assigned a little later on. The assignment is
> redundant and hence can be removed.

Applied to 5.4/scsi-queue, thanks!

Patch
diff mbox series

diff --git a/drivers/scsi/bfa/bfad_im.c b/drivers/scsi/bfa/bfad_im.c
index b2014cb96f58..22f06be2606f 100644
--- a/drivers/scsi/bfa/bfad_im.c
+++ b/drivers/scsi/bfa/bfad_im.c
@@ -536,7 +536,7 @@  bfad_im_scsi_host_alloc(struct bfad_s *bfad, struct bfad_im_port_s *im_port,
 			struct device *dev)
 {
 	struct bfad_im_port_pointer *im_portp;
-	int error = 1;
+	int error;
 
 	mutex_lock(&bfad_mutex);
 	error = idr_alloc(&bfad_im_port_index, im_port, 0, 0, GFP_KERNEL);