
28 Sep
2021
28 Sep
'21
3:27 p.m.
On Mon, Sep 27, 2021 at 2:22 PM Vladimir Oltean vladimir.oltean@nxp.com wrote:
If mdio_register fails, it is nice to not leave behind dangling allocated memory.
Signed-off-by: Vladimir Oltean vladimir.oltean@nxp.com
arch/powerpc/cpu/mpc85xx/ether_fcc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/cpu/mpc85xx/ether_fcc.c b/arch/powerpc/cpu/mpc85xx/ether_fcc.c index 1f6f55707321..5cf0a3fb227a 100644 --- a/arch/powerpc/cpu/mpc85xx/ether_fcc.c +++ b/arch/powerpc/cpu/mpc85xx/ether_fcc.c @@ -449,8 +449,10 @@ int fec_initialize(struct bd_info *bis) mdiodev->write = bb_miiphy_write;
retval = mdio_register(mdiodev);
if (retval < 0)
if (retval < 0) {
mdio_free(mdiodev); return retval;
}
#endif }
-- 2.25.1
Reviewed-by: Ramon Fried rfried.dev@gmail.com