Message ID | 20200205135649.163926-1-chenzhou10@huawei.com (mailing list archive) |
---|---|
State | Deferred |
Headers | show |
Series | [-next] scsi: ipr: remove redundant NULL check | expand |
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index ae45cbe..f027cf3 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -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);
Free function dma_pool_destroy() does NULL check, so the NULL check before dma_pool_destroy() is unnecessary, just remove it. Signed-off-by: Chen Zhou <chenzhou10@huawei.com> --- drivers/scsi/ipr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)