[U-Boot,i.MX8MM+CCF,06/41] cmd: clk: print err value when clk_get_rate failed
diff mbox series

Message ID 20190430103056.32537-7-peng.fan@nxp.com
State Superseded
Delegated to: Stefano Babic
Headers show
Series
  • i.MX8MM + CCF
Related show

Commit Message

Peng Fan April 30, 2019, 10:17 a.m. UTC
Print err value when clk_get_rate failed

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 cmd/clk.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Lukasz Majewski May 6, 2019, 10:03 p.m. UTC | #1
On Tue, 30 Apr 2019 10:17:50 +0000
Peng Fan <peng.fan@nxp.com> wrote:

> Print err value when clk_get_rate failed
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  cmd/clk.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/cmd/clk.c b/cmd/clk.c
> index 2ea82176aa..73d963184d 100644
> --- a/cmd/clk.c
> +++ b/cmd/clk.c
> @@ -41,6 +41,8 @@ int __weak soc_clk_dump(void)
>  		rate = clk_get_rate(&clk);
>  		if (!IS_ERR_VALUE(rate))
>  			printf("%-30.30s : %lu Hz\n", dev->name,
> rate);
> +		else
> +			printf("%-30.30s : err=%ld\n", dev->name,
> rate); 
>  		clk_free(&clk);
>  	}

Reviewed-by: Lukasz Majewski <lukma@denx.de>


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de

Patch
diff mbox series

diff --git a/cmd/clk.c b/cmd/clk.c
index 2ea82176aa..73d963184d 100644
--- a/cmd/clk.c
+++ b/cmd/clk.c
@@ -41,6 +41,8 @@  int __weak soc_clk_dump(void)
 		rate = clk_get_rate(&clk);
 		if (!IS_ERR_VALUE(rate))
 			printf("%-30.30s : %lu Hz\n", dev->name, rate);
+		else
+			printf("%-30.30s : err=%ld\n", dev->name, rate);
 
 		clk_free(&clk);
 	}