csi: libcxgbi: remove redundant check and close on csk
Subsystems (2)
PATCH 1/1 csi: libcxgbi: remove redundant check and close on csk
From: Colin Ian King <[email protected]>
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")
--- drivers/scsi/cxgbi/libcxgbi.c | 2 -- 1 file changed, 2 deletions(-)
drivers/scsi/cxgbi/libcxgbi.c +0 -2
@@ -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); }
Signature · 1 line
2.14.1
Quoted 18 lines · Colin King
From: Colin Ian King <[email protected]>
csk is always null on the error return path and so the non-null check and call to
cxgbi_sock_closedon csk is redundant and can be removed.Detected by: CoverityScan CID#114329 ("Logically dead code")
Signed-off-by Colin Ian King <[email protected]>--- drivers/scsi/cxgbi/libcxgbi.c | 2 -- 1 file changed, 2 deletions(-)drivers/scsi/cxgbi/libcxgbi.c +0
-0
drivers/scsi/cxgbi/libcxgbi.c cxgbi_check_route(struct sockaddr *dst_addr, int ifindex) · line 693
Quoted 8 lines
drivers/scsi/cxgbi/libcxgbi.c +0
-2@@ -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); }
Martin K. Petersen
AppliedColin,
Quoted 2 lines
csk is always null on the error return path and so the non-null check and call to
cxgbi_sock_closedon csk is redundant and can be removed.
Applied to 4.15/scsi-queue.
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering