Skip to content

Commit

Permalink
I/OAT: fix null device in call to dev_err()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shannon Nelson authored and Linus Torvalds committed Dec 18, 2007
1 parent 711924b commit bb8e8bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/dma/ioat_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1363,7 +1363,7 @@ struct ioatdma_device *ioat_dma_probe(struct pci_dev *pdev,
err_dma_pool:
kfree(device);
err_kzalloc:
dev_err(&device->pdev->dev,
dev_err(&pdev->dev,
"Intel(R) I/OAT DMA Engine initialization failed\n");
return NULL;
}
Expand Down

0 comments on commit bb8e8bc

Please sign in to comment.