lkml.org 
[lkml]   [2016]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] clocksource: timer-imx-gpt: make driver work again
We accidentally made mxc_timer_init_dt() return unconditionally.

Fixes: e93432390ec1 ('clocksource/drivers/timer-imx-gpt: Convert init function to return error')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/clocksource/timer-imx-gpt.c b/drivers/clocksource/timer-imx-gpt.c
index 5f64dff..f595460 100644
--- a/drivers/clocksource/timer-imx-gpt.c
+++ b/drivers/clocksource/timer-imx-gpt.c
@@ -485,7 +485,8 @@ static int __init mxc_timer_init_dt(struct device_node *np, enum imx_gpt_type t
return 0;

imxtm = kzalloc(sizeof(*imxtm), GFP_KERNEL);
- return -ENOMEM;
+ if (!imxtm)
+ return -ENOMEM;

imxtm->base = of_iomap(np, 0);
if (!imxtm->base)
\
 
 \ /
  Last update: 2016-06-16 13:21    [W:0.046 / U:0.820 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site