commit | 50ac64cfc39dad2ba0d8ad553d2d87dfc738cbba | [log] [tgz] |
---|---|---|
author | Johan Hovold <johan@kernel.org> | Wed Nov 30 15:29:49 2016 +0100 |
committer | David S. Miller <davem@davemloft.net> | Fri Dec 02 10:42:45 2016 -0500 |
tree | 8de0fca290b069bc9c2dbb07b7ee34a946f131e5 | |
parent | 6919756caaeaa76dc56287252fb656e3c2d9b4e1 [diff] |
net: ethernet: stmmac: dwmac-socfpga: fix use-after-free on probe errors Make sure to call stmmac_dvr_remove() before returning on late probe errors so that memory is freed, clocks are disabled, and the netdev is deregistered before its resources go away. Fixes: 3c201b5a84ed ("net: stmmac: socfpga: Remove re-registration of reset controller") Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>