Revision 7eeecc4b1f480c7ba1932cb9a7693f8c452640f2 authored by Samuel Holland on 03 January 2021, 11:17:41 UTC, committed by David S. Miller on 06 January 2021, 00:32:07 UTC
stmmac_pltfr_remove does three things in one function, making it
inapproprate for unwinding the steps in the probe function. Currently,
a failure before the call to stmmac_dvr_probe would leak OF node
references due to missing a call to stmmac_remove_config_dt. And an
error in stmmac_dvr_probe would cause the driver to attempt to remove a
netdevice that was never added. Fix these by reordering the init and
splitting out the error handling steps.

Fixes: 9f93ac8d4085 ("net-next: stmmac: Add dwmac-sun8i")
Fixes: 40a1dcee2d18 ("net: ethernet: dwmac-sun8i: Use the correct function in exit path")
Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 55b7ab1
History
File Mode Size
aoe
drbd
mtip32xx
null_blk
paride
rnbd
rsxx
xen-blkback
zram
Kconfig -rw-r--r-- 15.7 KB
Makefile -rw-r--r-- 1.4 KB
amiflop.c -rw-r--r-- 50.3 KB
ataflop.c -rw-r--r-- 55.3 KB
brd.c -rw-r--r-- 12.9 KB
cryptoloop.c -rw-r--r-- 4.3 KB
floppy.c -rw-r--r-- 136.7 KB
loop.c -rw-r--r-- 58.9 KB
loop.h -rw-r--r-- 2.3 KB
nbd.c -rw-r--r-- 60.5 KB
pktcdvd.c -rw-r--r-- 71.1 KB
ps3disk.c -rw-r--r-- 13.5 KB
ps3vram.c -rw-r--r-- 22.0 KB
rbd.c -rw-r--r-- 184.4 KB
rbd_types.h -rw-r--r-- 2.5 KB
skd_main.c -rw-r--r-- 93.2 KB
skd_s1120.h -rw-r--r-- 9.3 KB
sunvdc.c -rw-r--r-- 28.7 KB
swim.c -rw-r--r-- 19.6 KB
swim3.c -rw-r--r-- 31.3 KB
swim_asm.S -rw-r--r-- 4.4 KB
sx8.c -rw-r--r-- 37.2 KB
umem.c -rw-r--r-- 29.7 KB
umem.h -rw-r--r-- 3.6 KB
virtio_blk.c -rw-r--r-- 25.7 KB
xen-blkfront.c -rw-r--r-- 73.8 KB
xsysace.c -rw-r--r-- 33.2 KB
z2ram.c -rw-r--r-- 9.4 KB

back to top