Ports previous qla1280.c patch to 2.6.0-test2. Fixes incorrect if
statement. Inserts pci_free_consistent on error.
From: Leann Ogasawara <ogasawara@osdl.org>
((RESPONSE_ENTRY_CNT + 1) *
(sizeof(struct response))),
&dma_handle);
- if (!ha->request_ring)
+ if (!ha->response_ring)
goto error;
ha->response_dma = dma_handle;
status = 0;
+ goto finish;
error:
if (status)
dprintk(2, "qla1280_mem_alloc: **** FAILED ****\n");
+ if (ha->request_ring)
+ pci_free_consistent(ha->pdev,
+ ((REQUEST_ENTRY_CNT + 1) *
+ (sizeof(request_t))),
+ ha->request_ring, ha->request_dma);
+ finish:
LEAVE("qla1280_mem_alloc");
return status;
}