aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Yan <[email protected]>2020-04-18 17:59:03 +0800
committerMartin K. Petersen <[email protected]>2020-04-24 18:21:15 -0400
commit2e9ef0fcac01a871ab1afcaab9398beeb4d76ea9 (patch)
tree52b0a474df1a1af45742fb05ae88144e49f9fb84
parentf166021c0f51ffdb1661330ef8c8a5bb273560b8 (diff)
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/[email protected] Reported-by: Hulk Robot <[email protected]> Signed-off-by: Jason Yan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
-rw-r--r--drivers/scsi/ipr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index 0db37b4f7265..7d77997d26d4 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);