Skip to contentSkip to conversation

sep: eliminate kernel crash due to null parameter in dma_alloc_coherent

PATCH In review Mark Allyn 1 participant 1 message Dec 9, 2010 Staging

lore
Share & tools
lore

Mark Allyn

author
#0 lore raw

PATCH 11/11 sep: eliminate kernel crash due to null parameter in dma_alloc_coherent

---
 drivers/staging/sep/sep_driver.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/sep/sep_driver.c +1 -1
index bb42b04..2681fcf 100644
@@ -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");
Signature · 1 line
1.6.3.3