Skip to contentSkip to conversation

I/OAT: fix null device in call to dev_err()

PATCH New Shannon Nelson 1 participant 1 message Dec 14, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---

 drivers/dma/ioat_dma.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/dma/ioat_dma.c +1 -1
index c1c2dcc..19cd204 100644
@@ -1351,7 +1351,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;
 }