Commit bb8e8bcce7eceacb52eb0a3ebb64202ad6bcc438

Authored by Shannon Nelson
Committed by Linus Torvalds
1 parent 711924b105

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 <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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

drivers/dma/ioat_dma.c
... ... @@ -1363,7 +1363,7 @@
1363 1363 err_dma_pool:
1364 1364 kfree(device);
1365 1365 err_kzalloc:
1366   - dev_err(&device->pdev->dev,
  1366 + dev_err(&pdev->dev,
1367 1367 "Intel(R) I/OAT DMA Engine initialization failed\n");
1368 1368 return NULL;
1369 1369 }