net: dsa: felix: check return code of mdio_alloc and mdio_register
authorVladimir Oltean <vladimir.oltean@nxp.com>
Mon, 27 Sep 2021 11:22:02 +0000 (14:22 +0300)
committerRamon Fried <rfried.dev@gmail.com>
Tue, 28 Sep 2021 15:50:57 +0000 (18:50 +0300)
commitc9131fc72b618ce24959447aa55f66f583c49e8a
treef07ce90b4de25d8a289373cc54ee75d594bf5080
parent81386ed40590bf746849ce1a1d3a2edd869bad84
net: dsa: felix: check return code of mdio_alloc and mdio_register

These functions can return errors, it's best to catch them and trigger
the driver unwind code path.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
drivers/net/mscc_eswitch/felix_switch.c