diff mbox series

scsi: libfc: Remove unnecessary NULL check.

Message ID 20240211150916.4004-1-d.dulov@aladdin.ru
State New
Headers show
Series scsi: libfc: Remove unnecessary NULL check. | expand

Commit Message

Daniil Dulov Feb. 11, 2024, 3:09 p.m. UTC
sp is a result of shifting after dereference, so it is never NULL.
Thus, remove unnecessary NULL check.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 42e9a92fe6a9 ("[SCSI] libfc: A modular Fibre Channel library")
Signed-off-by: Daniil Dulov <d.dulov@aladdin.ru>
---
 drivers/scsi/libfc/fc_exch.c | 2 --
 1 file changed, 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c
index 4261380af97b..094d9decbcd4 100644
--- a/drivers/scsi/libfc/fc_exch.c
+++ b/drivers/scsi/libfc/fc_exch.c
@@ -650,8 +650,6 @@  static int fc_exch_abort_locked(struct fc_exch *ep,
 	 * Send the abort on a new sequence if possible.
 	 */
 	sp = fc_seq_start_next_locked(&ep->seq);
-	if (!sp)
-		return -ENOMEM;
 
 	if (timer_msec)
 		fc_exch_timer_set_locked(ep, timer_msec);