* [PATCH] clocksource: asm9260: Add a check for of_clk_get
@ 2019-10-16 12:43 Chuhong Yuan
2019-11-04 17:54 ` [tip: timers/core] clocksource/drivers/asm9260: " tip-bot2 for Chuhong Yuan
0 siblings, 1 reply; 2+ messages in thread
From: Chuhong Yuan @ 2019-10-16 12:43 UTC (permalink / raw)
Cc: Daniel Lezcano, Thomas Gleixner, linux-kernel, Chuhong Yuan
asm9260_timer_init misses a check for of_clk_get.
Add a check for it and print errors like other clocksource drivers.
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
---
drivers/clocksource/asm9260_timer.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/clocksource/asm9260_timer.c b/drivers/clocksource/asm9260_timer.c
index 9f09a59161e7..5b39d3701fa3 100644
--- a/drivers/clocksource/asm9260_timer.c
+++ b/drivers/clocksource/asm9260_timer.c
@@ -194,6 +194,10 @@ static int __init asm9260_timer_init(struct device_node *np)
}
clk = of_clk_get(np, 0);
+ if (IS_ERR(clk)) {
+ pr_err("Failed to get clk!\n");
+ return PTR_ERR(clk);
+ }
ret = clk_prepare_enable(clk);
if (ret) {
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [tip: timers/core] clocksource/drivers/asm9260: Add a check for of_clk_get
2019-10-16 12:43 [PATCH] clocksource: asm9260: Add a check for of_clk_get Chuhong Yuan
@ 2019-11-04 17:54 ` tip-bot2 for Chuhong Yuan
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Chuhong Yuan @ 2019-11-04 17:54 UTC (permalink / raw)
To: linux-tip-commits
Cc: Chuhong Yuan, Daniel Lezcano, Ingo Molnar, Borislav Petkov, linux-kernel
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 6e001f6a4cc73cd06fc7b8c633bc4906c33dd8ad
Gitweb: https://git.kernel.org/tip/6e001f6a4cc73cd06fc7b8c633bc4906c33dd8ad
Author: Chuhong Yuan <hslester96@gmail.com>
AuthorDate: Wed, 16 Oct 2019 20:43:30 +08:00
Committer: Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Mon, 04 Nov 2019 10:40:10 +01:00
clocksource/drivers/asm9260: Add a check for of_clk_get
asm9260_timer_init misses a check for of_clk_get.
Add a check for it and print errors like other clocksource drivers.
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20191016124330.22211-1-hslester96@gmail.com
---
drivers/clocksource/asm9260_timer.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/clocksource/asm9260_timer.c b/drivers/clocksource/asm9260_timer.c
index 9f09a59..5b39d37 100644
--- a/drivers/clocksource/asm9260_timer.c
+++ b/drivers/clocksource/asm9260_timer.c
@@ -194,6 +194,10 @@ static int __init asm9260_timer_init(struct device_node *np)
}
clk = of_clk_get(np, 0);
+ if (IS_ERR(clk)) {
+ pr_err("Failed to get clk!\n");
+ return PTR_ERR(clk);
+ }
ret = clk_prepare_enable(clk);
if (ret) {
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-04 17:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-16 12:43 [PATCH] clocksource: asm9260: Add a check for of_clk_get Chuhong Yuan
2019-11-04 17:54 ` [tip: timers/core] clocksource/drivers/asm9260: " tip-bot2 for Chuhong Yuan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).