summaryrefslogtreecommitdiffstats
path: root/drivers/clk/renesas/rcar-usb2-clock-sel.c
diff options
context:
space:
mode:
authorAdam Ford <aford173@gmail.com>2021-08-26 16:17:21 +0200
committerStephen Boyd <sboyd@kernel.org>2021-08-29 06:29:36 +0200
commit1669a941f7c4844ae808cf441db51dde9e94db07 (patch)
treea08ffbbb636020403725341e2f6eb797512e9536 /drivers/clk/renesas/rcar-usb2-clock-sel.c
parentclk: qcom: gdsc: Ensure regulator init state matches GDSC state (diff)
downloadlinux-1669a941f7c4844ae808cf441db51dde9e94db07.tar.xz
linux-1669a941f7c4844ae808cf441db51dde9e94db07.zip
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'. Signed-off-by: Adam Ford <aford173@gmail.com> Fixes: a20a40a8bbc2 ("clk: renesas: rcar-usb2-clock-sel: Fix error handling in .probe()") Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/renesas/rcar-usb2-clock-sel.c')
-rw-r--r--drivers/clk/renesas/rcar-usb2-clock-sel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/renesas/rcar-usb2-clock-sel.c b/drivers/clk/renesas/rcar-usb2-clock-sel.c
index 9fb79bd79435..684d8937965e 100644
--- 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;