aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2014-04-03 17:49:38 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-03 19:21:16 -0400
commit3378f73da2d7fb765240dbf348cad11648c5b775 (patch)
tree448b269911461bf99d29155af6e8e225c11cf105
parent4071ea25cc08d41002746cca2d69ac700d67a2ac (diff)
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: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/rtc/rtc-imxdi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-imxdi.c b/drivers/rtc/rtc-imxdi.c
index abd7f9091f34..cd741c77e085 100644
--- a/drivers/rtc/rtc-imxdi.c
+++ b/drivers/rtc/rtc-imxdi.c
@@ -401,7 +401,9 @@ static int __init dryice_rtc_probe(struct platform_device *pdev)
401 imxdi->clk = devm_clk_get(&pdev->dev, NULL); 401 imxdi->clk = devm_clk_get(&pdev->dev, NULL);
402 if (IS_ERR(imxdi->clk)) 402 if (IS_ERR(imxdi->clk))
403 return PTR_ERR(imxdi->clk); 403 return PTR_ERR(imxdi->clk);
404 clk_prepare_enable(imxdi->clk); 404 rc = clk_prepare_enable(imxdi->clk);
405 if (rc)
406 return rc;
405 407
406 /* 408 /*
407 * Initialize dryice hardware 409 * Initialize dryice hardware