From bb8e8bcce7eceacb52eb0a3ebb64202ad6bcc438 Mon Sep 17 00:00:00 2001 From: Shannon Nelson Date: Mon, 17 Dec 2007 16:20:08 -0800 Subject: [PATCH] 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 Signed-off-by: Shannon Nelson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/dma/ioat_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/ioat_dma.c b/drivers/dma/ioat_dma.c index c17ec3276062..45e7b4666c7b 100644 --- a/drivers/dma/ioat_dma.c +++ b/drivers/dma/ioat_dma.c @@ -1363,7 +1363,7 @@ err_completion_pool: 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; } -- 2.20.1