Skip to content

Commit 8437fcf

Browse files
Dan Carpentermartinkpetersen
authored andcommitted
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>
1 parent b2d3492 commit 8437fcf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/53c700.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ NCR_700_detect(struct scsi_host_template *tpnt,
295295
if(tpnt->sdev_attrs == NULL)
296296
tpnt->sdev_attrs = NCR_700_dev_attrs;
297297

298-
memory = dma_alloc_attrs(hostdata->dev, TOTAL_MEM_SIZE, &pScript,
298+
memory = dma_alloc_attrs(dev, TOTAL_MEM_SIZE, &pScript,
299299
GFP_KERNEL, DMA_ATTR_NON_CONSISTENT);
300300
if(memory == NULL) {
301301
printk(KERN_ERR "53c700: Failed to allocate memory for driver, detaching\n");

0 commit comments

Comments
 (0)