mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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 <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
This commit is contained in:
parent
b2d3492fc5
commit
8437fcf14d
1 changed files with 1 additions and 1 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in a new issue