scsi: ipr: Remove NULL check before freeing function
Fix the following coccicheck warning: drivers/scsi/ipr.c:9533:2-18: WARNING: NULL check before some freeing functions is not needed. Link: https://lore.kernel.org/r/20200418095903.35118-1-yanaijie@huawei.com Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
f166021c0f
commit
2e9ef0fcac
|
@ -9529,8 +9529,7 @@ static void ipr_free_cmd_blks(struct ipr_ioa_cfg *ioa_cfg)
|
|||
}
|
||||
}
|
||||
|
||||
if (ioa_cfg->ipr_cmd_pool)
|
||||
dma_pool_destroy(ioa_cfg->ipr_cmd_pool);
|
||||
dma_pool_destroy(ioa_cfg->ipr_cmd_pool);
|
||||
|
||||
kfree(ioa_cfg->ipr_cmnd_list);
|
||||
kfree(ioa_cfg->ipr_cmnd_list_dma);
|
||||
|
|
Loading…
Reference in New Issue
Block a user