mx28evk: Propagate the error if cpu_eth_init() fails
authorFabio Estevam <fabio.estevam@freescale.com>
Fri, 20 Sep 2013 19:30:49 +0000 (16:30 -0300)
committerStefano Babic <sbabic@denx.de>
Fri, 27 Sep 2013 11:53:35 +0000 (13:53 +0200)
If cpu_eth_init() fails we should return the error immediately.

Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
board/denx/m28evk/m28evk.c

index f4453d64abf18ae247de416f0f9cd53d6d605ba8..33d38cfc5493ff683e482dce2af41cc1e2e7bf26 100644 (file)
@@ -116,6 +116,8 @@ int board_eth_init(bd_t *bis)
        int ret;
 
        ret = cpu_eth_init(bis);
+       if (ret)
+               return ret;
 
        clrsetbits_le32(&clkctrl_regs->hw_clkctrl_enet,
                CLKCTRL_ENET_TIME_SEL_MASK | CLKCTRL_ENET_CLK_OUT_EN,