Skip to content

Commit bb8e8bc

Browse files
Shannon NelsonLinus Torvalds
authored andcommitted
I/OAT: fix null device in call to dev_err()
We can't use the device in a dev_err() after a kzalloc failure or after the kfree, so simplify it to the pdev that was originally passed in. Cc: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 711924b commit bb8e8bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/dma/ioat_dma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1363,7 +1363,7 @@ struct ioatdma_device *ioat_dma_probe(struct pci_dev *pdev,
13631363
err_dma_pool:
13641364
kfree(device);
13651365
err_kzalloc:
1366-
dev_err(&device->pdev->dev,
1366+
dev_err(&pdev->dev,
13671367
"Intel(R) I/OAT DMA Engine initialization failed\n");
13681368
return NULL;
13691369
}

0 commit comments

Comments
 (0)