Staging: sep: eliminate kernel crash due to null parameter in dma_alloc_coherent

Signed-off-by: Mark Allyn <mark.a.allyn@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Mark Allyn 2010-12-09 09:32:53 -08:00 committed by Greg Kroah-Hartman
parent 653bf0cfa5
commit fd599985e6

View 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");