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 <Peng.Fan@freescale.com> Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
This commit is contained in:
parent
d8bec60c1b
commit
eb412d79e4
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue