[PATCH] scsi: libfc: Remove unnecessary NULL check.

From: Daniil Dulov
Date: Sun Feb 11 2024 - 10:10:58 EST


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@xxxxxxxxxx>
---
drivers/scsi/libfc/fc_exch.c | 2 --
1 file changed, 2 deletions(-)

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);
--
2.25.1