clk: renesas: rcar-usb2-clock-sel: Fix kernel NULL pointer dereference
Subsystems (3)
PATCH 1/1 clk: renesas: rcar-usb2-clock-sel: Fix kernel NULL pointer dereference
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'.
drivers/clk/renesas/rcar-usb2-clock-sel.c +1 -1
@@ -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;
Signature · 1 line
2.25.1
Quoted 5 lines · Adam Ford
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 <[email protected]>
handling in .probe()")
Mike/Stephen: Can you please take this one directly, as we're already at rc7.
Thanks!
Quoted 12 lines
drivers/clk/renesas/rcar-usb2-clock-sel.c +1
-2@@ -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; --
Quoted 1 line
2.25.1
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] 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
Stephen Boyd
maintainerQuoting Geert Uytterhoeven (2021-08-26 10:42:29)
Quoted 7 lines · Adam Ford
Quoted 5 lines
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 <[email protected]>
Quoted 8 lines
Fixes a20a40a8bbc2cf4b ("clk: renesas: rcar-usb2-clock-sel: Fix errorhandling in .probe()")
Reviewed-by Geert Uytterhoeven <[email protected]>Mike/Stephen: Can you please take this one directly, as we're already at rc7.
Thanks!
It looks highly unlikely to make the cut but I'll try to send it off to Linus tomorrow.
Quoting Adam Ford (2021-08-26 07:17:21)
drivers/clk/renesas/rcar-usb2-clock-sel.c
Quoted 9 lines
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 <[email protected]>drivers/clk/renesas/rcar-usb2-clock-sel.c +0
-1--- a/drivers/clk/renesas/rcar-usb2-clock-sel.c
Applied to clk-fixes