Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 68bc74fe authored by Sekhar Nori's avatar Sekhar Nori Committed by David S. Miller
Browse files

net: davinci_emac: fix oops caused by uninitialized ndev->dev



Commit e1943128 (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: default avatarKevin Hilman <khilman@linaro.org>
Helped-by: default avatarGeorge Cherian <george.cherian@ti.com>
Signed-off-by: default avatarSekhar Nori <nsekhar@ti.com>
Acked-by: default avatarMugunthan V N <mugunthanvnm@ti.com>
Tested-by: default avatarLad, Prabhakar <prabhakar.csengg@gmail.com>
Tested-by: default avatarKevin Hilman <khilman@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cb421c28
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment