Blob Blame History Raw
From: Colin Ian King <colin.king@canonical.com>
Date: Thu, 7 Sep 2017 14:51:33 +0100
Subject: [PATCH] scsi: libcxgbi: remove redundant check and close on csk
References: bsc#1077989
Git-commit: 7c82532dcce8b39991ef5f486c2b54d7bb3e171b
Patch-mainline: v4.15-rc1

csk is always null on the error return path and so the non-null check
and call to cxgbi_sock_closed on csk is redundant and can be removed.

Detected by: CoverityScan CID#114329 ("Logically dead code")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/scsi/cxgbi/libcxgbi.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
index e399a9a7d0cb..11735f8051b8 100644
--- a/drivers/scsi/cxgbi/libcxgbi.c
+++ b/drivers/scsi/cxgbi/libcxgbi.c
@@ -688,8 +688,6 @@ cxgbi_check_route(struct sockaddr *dst_addr, int ifindex)
 
 rel_rt:
 	ip_rt_put(rt);
-	if (csk)
-		cxgbi_sock_closed(csk);
 err_out:
 	return ERR_PTR(err);
 }
-- 
2.12.3