]> git.sur5r.net Git - u-boot/commitdiff
mx6sxsabresd: Simplify the return value of setup_fec()
authorFabio Estevam <fabio.estevam@freescale.com>
Mon, 17 Nov 2014 01:44:42 +0000 (23:44 -0200)
committerStefano Babic <sbabic@denx.de>
Thu, 20 Nov 2014 09:30:20 +0000 (10:30 +0100)
We can simply the return the value from enable_fec_anatop_clock() to make the
code smaller and simpler.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
board/freescale/mx6sxsabresd/mx6sxsabresd.c

index 256ea2933660d5adcbae7d72f5a7ef17eff86095..3c33cecfd6230c14f82ef010857b50485154b389 100644 (file)
@@ -119,7 +119,6 @@ static int setup_fec(void)
 {
        struct iomuxc *iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR;
        struct anatop_regs *anatop = (struct anatop_regs *)ANATOP_BASE_ADDR;
-       int ret;
        int reg;
 
        /* Use 125MHz anatop loopback REF_CLK1 for ENET1 */
@@ -140,11 +139,7 @@ static int setup_fec(void)
        reg |= BM_ANADIG_PLL_ENET_REF_25M_ENABLE;
        writel(reg, &anatop->pll_enet);
 
-       ret = enable_fec_anatop_clock(ENET_125MHz);
-       if (ret)
-               return ret;
-
-       return 0;
+       return enable_fec_anatop_clock(ENET_125MHz);
 }
 
 int board_eth_init(bd_t *bis)