Commit 62cbe63f authored by Chuhong Yuan's avatar Chuhong Yuan Committed by Alexandre Belloni

rtc: asm9260: add the missed check for devm_clk_get

The driver misses a check for devm_clk_get().
Add the check to fix it.
Signed-off-by: default avatarChuhong Yuan <hslester96@gmail.com>
Link: https://lore.kernel.org/r/20191214074528.16806-1-hslester96@gmail.comSigned-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent bd0d9379
...@@ -264,6 +264,9 @@ static int asm9260_rtc_probe(struct platform_device *pdev) ...@@ -264,6 +264,9 @@ static int asm9260_rtc_probe(struct platform_device *pdev)
return PTR_ERR(priv->iobase); return PTR_ERR(priv->iobase);
priv->clk = devm_clk_get(dev, "ahb"); priv->clk = devm_clk_get(dev, "ahb");
if (IS_ERR(priv->clk))
return PTR_ERR(priv->clk);
ret = clk_prepare_enable(priv->clk); ret = clk_prepare_enable(priv->clk);
if (ret) { if (ret) {
dev_err(dev, "Failed to enable clk!\n"); dev_err(dev, "Failed to enable clk!\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment