]> git.sur5r.net Git - u-boot/commitdiff
mx6slevk: Simplify the return value of setup_fec()
authorFabio Estevam <fabio.estevam@freescale.com>
Mon, 17 Nov 2014 01:44:41 +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/mx6slevk/mx6slevk.c

index e76c343812e6de157d03a9fcd4b5336734266e65..8111edf804291e56ec9172695cc43e9e77c495e2 100644 (file)
@@ -230,16 +230,11 @@ int board_eth_init(bd_t *bis)
 static int setup_fec(void)
 {
        struct iomuxc *iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR;
-       int ret;
 
        /* clear gpr1[14], gpr1[18:17] to select anatop clock */
        clrsetbits_le32(&iomuxc_regs->gpr[1], IOMUX_GPR1_FEC_MASK, 0);
 
-       ret = enable_fec_anatop_clock(ENET_50MHz);
-       if (ret)
-               return ret;
-
-       return 0;
+       return enable_fec_anatop_clock(ENET_50MHz);
 }
 #endif