summaryrefslogtreecommitdiff
path: root/drivers/scsi/53c700.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-01-24 13:33:27 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2019-01-29 01:33:00 -0500
commit8437fcf14deed67e5ad90b5e8abf62fb20f30881 (patch)
treee739d4f5b73d90f5293ae66e1d57c2c03885d83b /drivers/scsi/53c700.c
parentb2d3492fc591b1fb46b81d79ca1fc44cac6ae0ae (diff)
scsi: 53c700: pass correct "dev" to dma_alloc_attrs()
The "hostdata->dev" pointer is NULL here. We set "hostdata->dev = dev;" later in the function and we also use "hostdata->dev" when we call dma_free_attrs() in NCR_700_release(). This bug predates git version control. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/53c700.c')
-rw-r--r--drivers/scsi/53c700.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c
index 128d658d472a..16957d7ac414 100644
--- a/drivers/scsi/53c700.c
+++ b/drivers/scsi/53c700.c
@@ -295,7 +295,7 @@ NCR_700_detect(struct scsi_host_template *tpnt,
if(tpnt->sdev_attrs == NULL)
tpnt->sdev_attrs = NCR_700_dev_attrs;
- memory = dma_alloc_attrs(hostdata->dev, TOTAL_MEM_SIZE, &pScript,
+ memory = dma_alloc_attrs(dev, TOTAL_MEM_SIZE, &pScript,
GFP_KERNEL, DMA_ATTR_NON_CONSISTENT);
if(memory == NULL) {
printk(KERN_ERR "53c700: Failed to allocate memory for driver, detaching\n");