Re: [PATCH] [v2] clk: renesas: rcar-usb2-clock-sel: Fix error handling in rcar_usb2_clock_sel_probe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;
> +       }
> +




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux