From: Peng Fan Date: Sun, 23 Nov 2014 03:52:20 +0000 (+0800) Subject: imx:mx6 fix return value of mxc_get_clock X-Git-Tag: v2015.01~91^2~20 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=eb412d79e476e871374ed1b8e561287746609018;p=oweals%2Fu-boot.git imx:mx6 fix return value of mxc_get_clock mxc_get_clock's return type is unsigned int. 'return -1' is same with 'return 0xffffffff', so 0 should be used as the return value when unsupported mxc_clock type is passed to mxc_get_clock. Also include an err message when unsupported mxc_clock type is passed to mxc_get_clock. Signed-off-by: Peng Fan Reviewed-by: Fabio Estevam --- diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c index 93a02adcec..b6983e60d7 100644 --- a/arch/arm/cpu/armv7/mx6/clock.c +++ b/arch/arm/cpu/armv7/mx6/clock.c @@ -746,10 +746,11 @@ unsigned int mxc_get_clock(enum mxc_clock clk) case MXC_SATA_CLK: return get_ahb_clk(); default: + printf("Unsupported MXC CLK: %d\n", clk); break; } - return -1; + return 0; } /*