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
fsl-mc
mhi
Kconfig -rw-r--r-- 7.9 KB
Makefile -rw-r--r-- 1.3 KB
arm-cci.c -rw-r--r-- 15.5 KB
arm-integrator-lm.c -rw-r--r-- 3.1 KB
brcmstb_gisb.c -rw-r--r-- 13.1 KB
bt1-apb.c -rw-r--r-- 9.2 KB
bt1-axi.c -rw-r--r-- 7.1 KB
da8xx-mstpri.c -rw-r--r-- 5.9 KB
hisi_lpc.c -rw-r--r-- 18.0 KB
imx-weim.c -rw-r--r-- 6.7 KB
mips_cdmm.c -rw-r--r-- 19.4 KB
moxtet.c -rw-r--r-- 18.6 KB
mvebu-mbus.c -rw-r--r-- 36.4 KB
omap-ocp2scp.c -rw-r--r-- 3.1 KB
omap_l3_noc.c -rw-r--r-- 10.6 KB
omap_l3_noc.h -rw-r--r-- 12.3 KB
omap_l3_smx.c -rw-r--r-- 7.1 KB
omap_l3_smx.h -rw-r--r-- 7.3 KB
qcom-ebi2.c -rw-r--r-- 10.5 KB
simple-pm-bus.c -rw-r--r-- 1.3 KB
sun50i-de2.c -rw-r--r-- 1.1 KB
sunxi-rsb.c -rw-r--r-- 19.0 KB
tegra-aconnect.c -rw-r--r-- 2.9 KB
tegra-gmi.c -rw-r--r-- 7.5 KB
ti-pwmss.c -rw-r--r-- 1.2 KB
ti-sysc.c -rw-r--r-- 77.0 KB
ts-nbus.c -rw-r--r-- 8.9 KB
uniphier-system-bus.c -rw-r--r-- 7.3 KB
vexpress-config.c -rw-r--r-- 10.0 KB

back to top