From: Shannon Nelson Date: Tue, 18 Dec 2007 00:20:08 +0000 (-0800) Subject: I/OAT: fix null device in call to dev_err() X-Git-Tag: v2.6.24-rc6~33 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bb8e8bcce7eceacb52eb0a3ebb64202ad6bcc438;p=karo-tx-linux.git 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 --- 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; }