OSDN Git Service

scsi: mpi3mr: Delete unnecessary NULL check
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 9 Jun 2021 09:26:02 +0000 (12:26 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 10 Jun 2021 03:01:24 +0000 (23:01 -0400)
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.

Link: https://lore.kernel.org/r/YMCJKgykDYtyvY44@mwanda
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mpi3mr/mpi3mr_fw.c

index acb2be6..40696b7 100644 (file)
@@ -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);