From: Matti Vaittinen Date: Fri, 7 Dec 2018 11:10:51 +0000 (+0200) Subject: clk: clk-st: avoid clkdev lookup leak at remove X-Git-Tag: v5.1-rc1~34^2~10^3 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=d3236214e7dead87e7aefd32259aaf0bf41cf050;p=uclinux-h8%2Flinux.git clk: clk-st: avoid clkdev lookup leak at remove Use devm based clkdev lookup registration to avoid leaking lookup structures. Signed-off-by: Matti Vaittinen Signed-off-by: Stephen Boyd --- diff --git a/drivers/clk/x86/clk-st.c b/drivers/clk/x86/clk-st.c index 3a0996f2d556..25d4b97aff9b 100644 --- a/drivers/clk/x86/clk-st.c +++ b/drivers/clk/x86/clk-st.c @@ -52,7 +52,8 @@ static int st_clk_probe(struct platform_device *pdev) 0, st_data->base + MISCCLKCNTL1, OSCCLKENB, CLK_GATE_SET_TO_DISABLE, NULL); - clk_hw_register_clkdev(hws[ST_CLK_GATE], "oscout1", NULL); + devm_clk_hw_register_clkdev(&pdev->dev, hws[ST_CLK_GATE], "oscout1", + NULL); return 0; }