Skip to contentSkip to conversation

scsi: libfc: Remove unnecessary NULL check.

PATCH New Daniil Dulov 1 participant 1 message Feb 11, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: libfc: Remove unnecessary NULL check.

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")
---
 drivers/scsi/libfc/fc_exch.c | 2 --
 1 file changed, 2 deletions(-)
drivers/scsi/libfc/fc_exch.c +0 -2
index 4261380af97b..094d9decbcd4 100644
@@ -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);
Signature · 1 line
2.25.1