mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-04 09:34:12 +08:00
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>
This commit is contained in:
parent
cd9df0c216
commit
12e3ef8b3e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user