summaryrefslogtreecommitdiff
path: root/drivers/scsi
diff options
context:
space:
mode:
authorkernel test robot <lkp@intel.com>2020-12-11 11:16:15 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2021-01-22 22:24:44 -0500
commit12e3ef8b3e7c0840dee76c4da7a0af8d5982c90d (patch)
tree45f572c536d6f194cb4867e351ad091fe5e6070c /drivers/scsi
parentcd9df0c216366f06b42d1d00b850039c145b73aa (diff)
scsi: megaraid: Fix ifnullfree.cocci warnings
NULL check before vfree is not needed. Generated by: scripts/coccinelle/free/ifnullfree.cocci Link: https://lore.kernel.org/r/alpine.DEB.2.22.394.2012111113060.2669@hadrien Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: kernel test robot <lkp@intel.com> Signed-off-by: Julia Lawall <julia.lawall@inria.fr> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_fusion.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index fd607287608e..38fc9467c625 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -3920,8 +3920,7 @@ megasas_free_host_crash_buffer(struct megasas_instance *instance)
{
unsigned int i;
for (i = 0; i < instance->drv_buf_alloc; i++) {
- if (instance->crash_buf[i])
- vfree(instance->crash_buf[i]);
+ vfree(instance->crash_buf[i]);
}
instance->drv_buf_index = 0;
instance->drv_buf_alloc = 0;