Commit 6890e4ea authored by Randy Dunlap's avatar Randy Dunlap Committed by Linus Torvalds

[PATCH] janitor: qla1280 pci alloc/free consistent checking

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>
parent abfc2282
...@@ -2008,15 +2008,22 @@ qla1280_mem_alloc(struct scsi_qla_host *ha) ...@@ -2008,15 +2008,22 @@ qla1280_mem_alloc(struct scsi_qla_host *ha)
((RESPONSE_ENTRY_CNT + 1) * ((RESPONSE_ENTRY_CNT + 1) *
(sizeof(struct response))), (sizeof(struct response))),
&dma_handle); &dma_handle);
if (!ha->request_ring) if (!ha->response_ring)
goto error; goto error;
ha->response_dma = dma_handle; ha->response_dma = dma_handle;
status = 0; status = 0;
goto finish;
error: error:
if (status) if (status)
dprintk(2, "qla1280_mem_alloc: **** FAILED ****\n"); 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"); LEAVE("qla1280_mem_alloc");
return status; return status;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment