aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/cpu/mpc85xx/ether_fcc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/powerpc/cpu/mpc85xx/ether_fcc.c b/arch/powerpc/cpu/mpc85xx/ether_fcc.c
index 1f6f557073..5cf0a3fb22 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
}