lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date: Sun, 11 Feb 2024 07:09:16 -0800
From: Daniil Dulov <d.dulov@...ddin.ru>
To: Hannes Reinecke <hare@...e.de>
CC: Daniil Dulov <d.dulov@...ddin.ru>, "James E.J. Bottomley"
	<jejb@...ux.ibm.com>, "Martin K. Petersen" <martin.petersen@...cle.com>,
	Robert Love <robert.w.love@...el.com>, James Bottomley
	<James.Bottomley@...senPartnership.com>, <linux-scsi@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <lvc-project@...uxtesting.org>
Subject: [PATCH] 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")
Signed-off-by: Daniil Dulov <d.dulov@...ddin.ru>
---
 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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ