linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] [v2] clk: renesas: rcar-usb2-clock-sel: Fix error handling in rcar_usb2_clock_sel_probe
       [not found] <20210412112601.31719-1-dinghao.liu@zju.edu.cn>
@ 2021-04-12 20:22 ` Stephen Boyd
  0 siblings, 0 replies; only message in thread
From: Stephen Boyd @ 2021-04-12 20:22 UTC (permalink / raw)
  To: dinghao.liu, kjlu
  Cc: Geert Uytterhoeven, Michael Turquette, linux-renesas-soc,
	linux-clk, linux-kernel

Quoting Dinghao Liu (2021-04-12 04:26:01)
> diff --git a/drivers/clk/renesas/rcar-usb2-clock-sel.c b/drivers/clk/renesas/rcar-usb2-clock-sel.c
> index 3abafd78f7c8..3b0e33e0bf7b 100644
> --- a/drivers/clk/renesas/rcar-usb2-clock-sel.c
> +++ b/drivers/clk/renesas/rcar-usb2-clock-sel.c
> @@ -193,11 +191,22 @@ static int rcar_usb2_clock_sel_probe(struct platform_device *pdev)
>         init.num_parents = 0;
>         priv->hw.init = &init;
>  
> -       clk = clk_register(NULL, &priv->hw);
> -       if (IS_ERR(clk))
> -               return PTR_ERR(clk);
> +       clk = devm_clk_register(NULL, &priv->hw);

Please use devm_clk_hw_register() unless that can't be done for some
reason?

> +       if (IS_ERR(clk)) {
> +               ret = PTR_ERR(clk);
> +               goto pm_put;
> +       }
> +

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-12 20:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210412112601.31719-1-dinghao.liu@zju.edu.cn>
2021-04-12 20:22 ` [PATCH] [v2] clk: renesas: rcar-usb2-clock-sel: Fix error handling in rcar_usb2_clock_sel_probe Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).