[PATCH] scsi: ipr: NULL check before some freeing functions is not needed.

From: Thomas Meyer
Date: Sun Dec 02 2018 - 16:15:03 EST


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