From: Sekhar Nori Date: Tue, 20 May 2014 10:11:37 +0000 (+0530) Subject: net: davinci_emac: fix oops caused by uninitialized ndev->dev X-Git-Tag: omap-for-v3.16/fixes-against-rc1~36^2~170 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68bc74feb0ce1cc79cb2b5bbdfc592f30f37dab8;p=pandora-kernel.git net: davinci_emac: fix oops caused by uninitialized ndev->dev Commit e194312854edc22a2faf1931b3c0608fe20cb969 (drivers: net: davinci_cpdma: Convert kzalloc() to devm_kzalloc()) triggered a bug in emac_probe() wherein dev member of net_device is used for devres allocations even before it is initialized. This patch fixes that by using the struct device in platform_device instead. While at it, use &pdev->dev consistently for console messages instead of using ndev->dev for just one case and remove an unnecessary line continuation. Reported-by: Kevin Hilman Helped-by: George Cherian Signed-off-by: Sekhar Nori Acked-by: Mugunthan V N Tested-by: Lad, Prabhakar Tested-by: Kevin Hilman Signed-off-by: David S. Miller --- Reading git-diff-tree failed