[PATCH 3/4] cmd: clk: update result of do_clk_setfreq
Sean Anderson
seanga2 at gmail.com
Tue Feb 1 15:44:06 CET 2022
On 1/31/22 11:21 AM, Patrick Delaunay wrote:
> Update the result of do_clk_setfreq and always returns a CMD_RET_ value
> (-EINVAL was a possible result).
>
> This patch avoid the CLI output "exit not allowed from main input shell."
>
> Fixes: 7ab418fbe612 ("clk: add support for setting clk rate from cmdline")
> Signed-off-by: Patrick Delaunay <patrick.delaunay at foss.st.com>
> ---
>
> cmd/clk.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/cmd/clk.c b/cmd/clk.c
> index d615f14a84..73dea5e746 100644
> --- a/cmd/clk.c
> +++ b/cmd/clk.c
> @@ -116,7 +116,7 @@ static int do_clk_setfreq(struct cmd_tbl *cmdtp, int flag, int argc,
>
> if (!clk) {
> printf("clock '%s' not found.\n", argv[1]);
> - return -EINVAL;
> + return CMD_RET_FAILURE;
> }
>
> freq = clk_set_rate(clk, freq);
>
Reviewed-by: Sean Anderson <seanga2 at gmail.com>
More information about the U-Boot
mailing list