ot1200: Fix error handling in board_mmc_init()
authorFabio Estevam <fabio.estevam@freescale.com>
Fri, 21 Nov 2014 18:42:56 +0000 (16:42 -0200)
committerStefano Babic <sbabic@denx.de>
Mon, 24 Nov 2014 11:10:18 +0000 (12:10 +0100)
commite37197acad30928b434c54842642b11ce5f3639b
treef5ea53472b322f636c1c2efaaa75c88c50eec87f
parent44b9841d7898a03e73b5054f56303514a5b35db8
ot1200: Fix error handling in board_mmc_init()

When an invalid USDHC port is passed we should return -EINVAL instead of 0.

Also, return the error immediately on fsl_esdhc_initialize() failure.

Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
board/bachmann/ot1200/ot1200.c