summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid/megaraid_mm.c
diff options
context:
space:
mode:
authorThomas Meyer <thomas@m3y3r.de>2018-12-02 21:52:11 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2018-12-08 03:46:22 +0100
commit19c0507252c977ba8b3d2e2fe99afd2c176a993b (patch)
treec3c3a2dd8df1611d05beef8485f2165abcdcf06c /drivers/scsi/megaraid/megaraid_mm.c
parentscsi: qla2xxx: Split the __qla2x00_abort_all_cmds() function (diff)
downloadlinux-19c0507252c977ba8b3d2e2fe99afd2c176a993b.tar.xz
linux-19c0507252c977ba8b3d2e2fe99afd2c176a993b.zip
scsi: megaraid_sas: NULL check before some freeing functions is not needed
NULL check before some freeing functions is not needed. Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Acked-by: Sumit Saxena <sumit.saxena@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_mm.c')
-rw-r--r--drivers/scsi/megaraid/megaraid_mm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/megaraid/megaraid_mm.c b/drivers/scsi/megaraid/megaraid_mm.c
index 8428247015db..3ce837e4b24c 100644
--- a/drivers/scsi/megaraid/megaraid_mm.c
+++ b/drivers/scsi/megaraid/megaraid_mm.c
@@ -1017,8 +1017,7 @@ memalloc_error:
kfree(adapter->kioc_list);
kfree(adapter->mbox_list);
- if (adapter->pthru_dma_pool)
- dma_pool_destroy(adapter->pthru_dma_pool);
+ dma_pool_destroy(adapter->pthru_dma_pool);
kfree(adapter);