1
0
Fork 0

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>
hifive-unleashed-5.1
Fabio Estevam 2014-04-03 14:49:38 -07:00 committed by Linus Torvalds
parent 4071ea25cc
commit 3378f73da2
1 changed files with 3 additions and 1 deletions

View File

@ -401,7 +401,9 @@ static int __init dryice_rtc_probe(struct platform_device *pdev)
imxdi->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_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