summaryrefslogtreecommitdiffstats
path: root/drivers/clocksource/timer-nps.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/clocksource/timer-nps.c')
-rw-r--r--drivers/clocksource/timer-nps.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/clocksource/timer-nps.c b/drivers/clocksource/timer-nps.c
index b4c8a023a2d4..8da5e93b6810 100644
--- a/drivers/clocksource/timer-nps.c
+++ b/drivers/clocksource/timer-nps.c
@@ -53,9 +53,10 @@ static int __init nps_get_timer_clk(struct device_node *node,
int ret;
*clk = of_clk_get(node, 0);
- if (IS_ERR(*clk)) {
+ ret = PTR_ERR_OR_ZERO(*clk);
+ if (ret) {
pr_err("timer missing clk");
- return PTR_ERR(*clk);
+ return ret;
}
ret = clk_prepare_enable(*clk);