Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net: davinci_emac: fix oops caused by uninitialized ndev->dev
Commit e194312 (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 <[email protected]> Helped-by: George Cherian <[email protected]> Signed-off-by: Sekhar Nori <[email protected]> Acked-by: Mugunthan V N <[email protected]> Tested-by: Lad, Prabhakar <[email protected]> Tested-by: Kevin Hilman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
- Loading branch information