Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Fabio Estevam and committed by
Linus Torvalds
3378f73d 4071ea25

+3 -1
+3 -1
drivers/rtc/rtc-imxdi.c
··· 401 401 imxdi->clk = devm_clk_get(&pdev->dev, NULL); 402 402 if (IS_ERR(imxdi->clk)) 403 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 409 * Initialize dryice hardware