Commit 3378f73d authored by Fabio Estevam's avatar Fabio Estevam Committed by Linus Torvalds

drivers/rtc/rtc-imxdi.c: check the return value from clk_prepare_enable()

clk_prepare_enable() may fail, so let's check its return value and
propagate it in the case of error.
Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 4071ea25
...@@ -401,7 +401,9 @@ static int __init dryice_rtc_probe(struct platform_device *pdev) ...@@ -401,7 +401,9 @@ static int __init dryice_rtc_probe(struct platform_device *pdev)
imxdi->clk = devm_clk_get(&pdev->dev, NULL); imxdi->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(imxdi->clk)) if (IS_ERR(imxdi->clk))
return PTR_ERR(imxdi->clk); return PTR_ERR(imxdi->clk);
clk_prepare_enable(imxdi->clk); rc = clk_prepare_enable(imxdi->clk);
if (rc)
return rc;
/* /*
* Initialize dryice hardware * Initialize dryice hardware
......
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