projects/linux·commit bb8e8bcc

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

bb8e8bcc · Shannon Nelson <[email protected]> · 2007-12-17 16:20:08 -08:00

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 <[email protected]>
Signed-off-by: Shannon Nelson <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
bb8e8bcce7eceacb52eb0a3ebb64202ad6bcc438
Parents
711924b1

Changes

1 files changed · +1 −1

FileStatusAddDelContent
drivers/dma/ioat_dma.cmodified+1−1View file

drivers/dma/ioat_dma.c

View file
diff --git a/drivers/dma/ioat_dma.c b/drivers/dma/ioat_dma.c
index c17ec32..45e7b46 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;
}