Staging: sep: eliminate kernel crash due to null parameter in dma_alloc_coherent
authorMark Allyn <mark.a.allyn@intel.com>
Thu, 9 Dec 2010 17:32:53 +0000 (09:32 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 10 Dec 2010 00:37:50 +0000 (16:37 -0800)
Signed-off-by: Mark Allyn <mark.a.allyn@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/sep/sep_driver.c

index bb42b04..2681fcf 100644 (file)
@@ -3442,7 +3442,7 @@ static int __devinit sep_probe(struct pci_dev *pdev,
        }
 
        sep->rar_size = FAKE_RAR_SIZE;
-       sep->rar_addr = dma_alloc_coherent(NULL,
+       sep->rar_addr = dma_alloc_coherent(&sep->pdev->dev,
                sep->rar_size, &sep->rar_bus, GFP_KERNEL);
        if (sep->rar_addr == NULL) {
                dev_warn(&sep->pdev->dev, "can't allocate mfld rar\n");