Re: [PATCH] clk: renesas: rcar-usb2-clock-sel: Fix kernel NULL pointer dereference

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

 



On Thu, Aug 26, 2021 at 4:17 PM Adam Ford <aford173@xxxxxxxxx> wrote:
> The probe was manually passing NULL instead of dev to devm_clk_hw_register.
> This caused a Unable to handle kernel NULL pointer dereference error.
> Fix this by passing 'dev'.
>
> Signed-off-by: Adam Ford <aford173@xxxxxxxxx>

Fixes: a20a40a8bbc2cf4b ("clk: renesas: rcar-usb2-clock-sel: Fix error
handling in .probe()")
Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>

Mike/Stephen: Can you please take this one directly, as we're
already at rc7.
Thanks!

> --- a/drivers/clk/renesas/rcar-usb2-clock-sel.c
> +++ b/drivers/clk/renesas/rcar-usb2-clock-sel.c
> @@ -187,7 +187,7 @@ static int rcar_usb2_clock_sel_probe(struct platform_device *pdev)
>         init.ops = &usb2_clock_sel_clock_ops;
>         priv->hw.init = &init;
>
> -       ret = devm_clk_hw_register(NULL, &priv->hw);
> +       ret = devm_clk_hw_register(dev, &priv->hw);
>         if (ret)
>                 goto pm_put;
>
> --
> 2.25.1

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