net: dsa: felix: perform teardown on error in felix_setup
authorVladimir Oltean <vladimir.oltean@nxp.com>
Tue, 16 Feb 2021 11:32:13 +0000 (13:32 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Feb 2021 21:52:57 +0000 (13:52 -0800)
commit6b73b7c96a91689b8167b1f7da0e89b997af0736
treefe74c37b0395dda8abc8b6eeb43a5cde86af937a
parent42b5adbbac03bdb396192316c015fa3e64ffd5a1
net: dsa: felix: perform teardown on error in felix_setup

If the driver fails to probe, it would be nice to not leak memory.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/ocelot/felix.c