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>] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 9 Jun 2021 12:26:02 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     "James E.J. Bottomley" <jejb@...ux.ibm.com>
Cc:     "Martin K. Petersen" <martin.petersen@...cle.com>,
        Hannes Reinecke <hare@...e.de>,
        Tomas Henzl <thenzl@...hat.com>,
        Kashyap Desai <kashyap.desai@...adcom.com>,
        Himanshu Madhani <himanshu.madhani@...cle.com>,
        linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: [PATCH 1/2] scsi: mpi3mr: delete unnecessary NULL check

The "mrioc->intr_info" pointer can't be NULL, but if it could then the
second iteration through the loop would Oops.  Let's delete the
confusing and impossible NULL check.

Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
---
 drivers/scsi/mpi3mr/mpi3mr_fw.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c
index acb2be62080a..40696b75345d 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_fw.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c
@@ -3583,8 +3583,7 @@ static void mpi3mr_free_mem(struct mpi3mr_ioc *mrioc)
 
 	for (i = 0; i < mrioc->intr_info_count; i++) {
 		intr_info = mrioc->intr_info + i;
-		if (intr_info)
-			intr_info->op_reply_q = NULL;
+		intr_info->op_reply_q = NULL;
 	}
 
 	kfree(mrioc->req_qinfo);
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ