Repository navigation
Commit 68bc74f
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 <khilman@linaro.org>
Helped-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Tested-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Tested-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent cb421c2 commit 68bc74f
1 file changed
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1865 | 1865 | | |
1866 | 1866 | | |
1867 | 1867 | | |
1868 | | - | |
1869 | 1868 | | |
1870 | 1869 | | |
1871 | 1870 | | |
| |||
1911 | 1910 | | |
1912 | 1911 | | |
1913 | 1912 | | |
1914 | | - | |
1915 | 1913 | | |
1916 | 1914 | | |
1917 | 1915 | | |
| |||
1930 | 1928 | | |
1931 | 1929 | | |
1932 | 1930 | | |
1933 | | - | |
| 1931 | + | |
1934 | 1932 | | |
1935 | 1933 | | |
1936 | 1934 | | |
| |||
1994 | 1992 | | |
1995 | 1993 | | |
1996 | 1994 | | |
1997 | | - | |
| 1995 | + | |
1998 | 1996 | | |
1999 | 1997 | | |
2000 | 1998 | | |
| |||
0 commit comments