mpt3sas: A correction in unmap_resources

It might happen that we try to free an already freed pointer.

Reported-by: Maurizio Lombardi <mlombard@redhat.com>
Signed-off-by: Tomas Henzl <thenzl@redhat.com>
Acked-by: Chaitra P B <chaitra.basappa@avagotech.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Tomas Henzl 2015-12-23 14:21:47 +01:00 committed by Martin K. Petersen
parent cca8f13b4f
commit 5f985d88ba

View File

@ -2020,8 +2020,10 @@ mpt3sas_base_unmap_resources(struct MPT3SAS_ADAPTER *ioc)
_base_free_irq(ioc);
_base_disable_msix(ioc);
if (ioc->msix96_vector)
if (ioc->msix96_vector) {
kfree(ioc->replyPostRegisterIndex);
ioc->replyPostRegisterIndex = NULL;
}
if (ioc->chip_phys) {
iounmap(ioc->chip);