projects
/
platform
/
kernel
/
linux-rpi3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fbd5e75
)
drivers/rtc/rtc-mxc.c: check the return value from clk_prepare_enable()
author
Fabio Estevam
<fabio.estevam@freescale.com>
Thu, 23 Jan 2014 23:55:05 +0000
(15:55 -0800)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Fri, 24 Jan 2014 00:36:59 +0000
(16:36 -0800)
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>
drivers/rtc/rtc-mxc.c
patch
|
blob
|
history
diff --git
a/drivers/rtc/rtc-mxc.c
b/drivers/rtc/rtc-mxc.c
index
a3ed1cf
..
419874f
100644
(file)
--- a/
drivers/rtc/rtc-mxc.c
+++ b/
drivers/rtc/rtc-mxc.c
@@
-394,7
+394,10
@@
static int mxc_rtc_probe(struct platform_device *pdev)
return PTR_ERR(pdata->clk);
}
- clk_prepare_enable(pdata->clk);
+ ret = clk_prepare_enable(pdata->clk);
+ if (ret)
+ return ret;
+
rate = clk_get_rate(pdata->clk);
if (rate == 32768)