NULL check before some freeing functions is not needed. Signed-off-by: Thomas Meyer <thomas@xxxxxxxx> --- diff -u -p a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -9537,8 +9537,7 @@ static void ipr_free_cmd_blks(struct ipr } } - 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);