Subject: Re: [PATCH] net: davinci_emac: fix oops caused by uninitialized ndev->dev

From: Kevin Hilman <[email-masked]>
Date: Wed, 21 May 2014 16:39:40 -0700

Sekhar Nori <[email-masked]> writes:

> 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 <[email-masked]>
> Helped-by: George Cherian <[email-masked]>
> Signed-off-by: Sekhar Nori <[email-masked]>

Tested-by: Kevin Hilman <[email-masked]>

I verified this patch fixes the boot on dm365-evm (legacy boot) and
da850-evm (DT boot).

Thanks,

Kevin