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:
Jason Yan 2020-04-18 17:59:03 +08:00 committed by Martin K. Petersen
parent f166021c0f
commit 2e9ef0fcac

View File

@ -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);