Re: [PATCH] [v3] 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]

 



Hi Dinghao,

On Thu, Apr 15, 2021 at 9:33 AM Dinghao Liu <dinghao.liu@xxxxxxxxxx> wrote:
> The error handling paths after pm_runtime_get_sync() has no
> refcount decrement, which leads to refcount leak.
>
> Signed-off-by: Dinghao Liu <dinghao.liu@xxxxxxxxxx>
> ---
>
> Changelog:
>
> v2: - Move the position of pm_runtime_enable,_get_sync().
>       Use devm_clk_register() to simplify error handling.

Thanks for the update!

> --- a/drivers/clk/renesas/rcar-usb2-clock-sel.c
> +++ b/drivers/clk/renesas/rcar-usb2-clock-sel.c
> @@ -131,7 +131,6 @@ static int rcar_usb2_clock_sel_remove(struct platform_device *pdev)
>         struct usb2_clock_sel_priv *priv = platform_get_drvdata(pdev);

    warning: unused variable ‘priv’ [-Wunused-variable]

Have you compiled this?

>
>         of_clk_del_provider(dev->of_node);
> -       clk_hw_unregister(&priv->hw);
>         pm_runtime_put(dev);
>         pm_runtime_disable(dev);
>

Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
i.e. will queue in renesas-clk-for-v5.14, with the above fixed.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[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