Skip to contentSkip to conversation

scsi: ipr: remove redundant NULL check

PATCH New Chen Zhou 1 participant 1 message Feb 5, 2020

Subsystems (2)
lore
Share & tools
lore

Chen Zhou

author
#0 lore raw

PATCH 1/1 scsi: ipr: remove redundant NULL check

Free function dma_pool_destroy() does NULL check, so the NULL check before dma_pool_destroy() is unnecessary, just remove it.

---
 drivers/scsi/ipr.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/scsi/ipr.c +1 -2
index ae45cbe..f027cf3 100644
@@ -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);
Signature · 1 line
2.7.4