提交 bb8e8bcc 编写于 作者: S Shannon Nelson 提交者: Linus Torvalds

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: NShannon Nelson <shannon.nelson@intel.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 711924b1
...@@ -1363,7 +1363,7 @@ struct ioatdma_device *ioat_dma_probe(struct pci_dev *pdev, ...@@ -1363,7 +1363,7 @@ struct ioatdma_device *ioat_dma_probe(struct pci_dev *pdev,
err_dma_pool: err_dma_pool:
kfree(device); kfree(device);
err_kzalloc: err_kzalloc:
dev_err(&device->pdev->dev, dev_err(&pdev->dev,
"Intel(R) I/OAT DMA Engine initialization failed\n"); "Intel(R) I/OAT DMA Engine initialization failed\n");
return NULL; return NULL;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册