Skip to content

Commit 12e3ef8

Browse files
intel-lab-lkpmartinkpetersen
authored andcommitted
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 <[email protected]> Signed-off-by: kernel test robot <[email protected]> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent cd9df0c commit 12e3ef8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/scsi/megaraid/megaraid_sas_fusion.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3920,8 +3920,7 @@ megasas_free_host_crash_buffer(struct megasas_instance *instance)
39203920
{
39213921
unsigned int i;
39223922
for (i = 0; i < instance->drv_buf_alloc; i++) {
3923-
if (instance->crash_buf[i])
3924-
vfree(instance->crash_buf[i]);
3923+
vfree(instance->crash_buf[i]);
39253924
}
39263925
instance->drv_buf_index = 0;
39273926
instance->drv_buf_alloc = 0;

0 commit comments

Comments
 (0)