]> err.no Git - linux-2.6/commitdiff
I/OAT: fix null device in call to dev_err()
authorShannon Nelson <shannon.nelson@intel.com>
Tue, 18 Dec 2007 00:20:08 +0000 (16:20 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 18 Dec 2007 03:28:17 +0000 (19:28 -0800)
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: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/dma/ioat_dma.c

index c17ec3276062219216f7d85d30a7c1646e82a679..45e7b4666c7b3c5197eeaa0c256dcf76860a2161 100644 (file)
@@ -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;
 }