Skip to content

Commit

Permalink
rtc: asm9260: add the missed check for devm_clk_get
Browse files Browse the repository at this point in the history
The driver misses a check for devm_clk_get().
Add the check to fix it.

Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Link: https://lore.kernel.org/r/20191214074528.16806-1-hslester96@gmail.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
  • Loading branch information
Chuhong Yuan authored and Alexandre Belloni committed Dec 23, 2019
1 parent bd0d937 commit 62cbe63
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/rtc/rtc-asm9260.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ static int asm9260_rtc_probe(struct platform_device *pdev)
return PTR_ERR(priv->iobase);

priv->clk = devm_clk_get(dev, "ahb");
if (IS_ERR(priv->clk))
return PTR_ERR(priv->clk);

ret = clk_prepare_enable(priv->clk);
if (ret) {
dev_err(dev, "Failed to enable clk!\n");
Expand Down

0 comments on commit 62cbe63

Please sign in to comment.