aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_base.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c
index b04ccad7d972..b830d61684dd 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_base.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_base.c
@@ -1919,7 +1919,10 @@ _base_release_memory_pools(struct MPT2SAS_ADAPTER *ioc)
1919 ioc->config_page, ioc->config_page_dma); 1919 ioc->config_page, ioc->config_page_dma);
1920 } 1920 }
1921 1921
1922 free_pages((ulong)ioc->scsi_lookup, ioc->scsi_lookup_pages); 1922 if (ioc->scsi_lookup) {
1923 free_pages((ulong)ioc->scsi_lookup, ioc->scsi_lookup_pages);
1924 ioc->scsi_lookup = NULL;
1925 }
1923 kfree(ioc->hpr_lookup); 1926 kfree(ioc->hpr_lookup);
1924 kfree(ioc->internal_lookup); 1927 kfree(ioc->internal_lookup);
1925} 1928}