aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorSalyzyn, Mark <mark_salyzyn@adaptec.com>2007-08-02 15:38:59 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-08-04 10:46:43 -0400
commit2b053729a84b6aac197df51b8729bc9fec743bff (patch)
treed7e709604787655345c155b81c24718ba2577e99 /drivers/scsi
parent2338545aafbecce55bbc651fb3f63ebf7468b6fb (diff)
[SCSI] aacraid: prevent panic on adapter resource failure
If the driver fails to allocate the contiguous (DMAable) memory for system reasons, we fail to load the instance, but then we try to free the <nul> allocation in the cleanup code and we get a panic in pci_free_consistent(). This is reported against an older kernel, hope this is relevant for latest/greatest. Signed-off-by: Mark Salyzyn <aacraid@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/aacraid/linit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index 813556c60007..a7f42a17b5c7 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -1110,7 +1110,9 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
1110 __aac_shutdown(aac); 1110 __aac_shutdown(aac);
1111 out_unmap: 1111 out_unmap:
1112 aac_fib_map_free(aac); 1112 aac_fib_map_free(aac);
1113 pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr, aac->comm_phys); 1113 if (aac->comm_addr)
1114 pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr,
1115 aac->comm_phys);
1114 kfree(aac->queues); 1116 kfree(aac->queues);
1115 aac_adapter_ioremap(aac, 0); 1117 aac_adapter_ioremap(aac, 0);
1116 kfree(aac->fibs); 1118 kfree(aac->fibs);