[<prev] [next>] [day] [month] [year] [list]
Message-ID: <161825896343.3764895.12784736660315356953@swboyd.mtv.corp.google.com>
Date: Mon, 12 Apr 2021 13:22:43 -0700
From: Stephen Boyd <sboyd@...nel.org>
To: dinghao.liu@....edu.cn, kjlu@....edu
Cc: Geert Uytterhoeven <geert+renesas@...der.be>,
Michael Turquette <mturquette@...libre.com>,
linux-renesas-soc@...r.kernel.org, linux-clk@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [v2] clk: renesas: rcar-usb2-clock-sel: Fix error handling in rcar_usb2_clock_sel_probe
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;
> + }
> +
Powered by blists - more mailing lists