Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1423929 > unrolled thread

[patch] clocksource: timer-imx-gpt: make driver work again

Started byDan Carpenter <dan.carpenter@oracle.com>
First post2016-06-16 12:50 +0200
Last post2016-06-16 13:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [patch] clocksource: timer-imx-gpt: make driver work again Dan Carpenter <dan.carpenter@oracle.com> - 2016-06-16 12:50 +0200
    Re: [patch] clocksource: timer-imx-gpt: make driver work again Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-06-16 13:10 +0200

#1423929 — [patch] clocksource: timer-imx-gpt: make driver work again

FromDan Carpenter <dan.carpenter@oracle.com>
Date2016-06-16 12:50 +0200
Subject[patch] clocksource: timer-imx-gpt: make driver work again
Message-ID<rKD21-7fn-13@gated-at.bofh.it>
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)

[toc] | [next] | [standalone]


#1423944

FromDaniel Lezcano <daniel.lezcano@linaro.org>
Date2016-06-16 13:10 +0200
Message-ID<rKDlo-7DU-25@gated-at.bofh.it>
In reply to#1423929
On 06/16/2016 12:42 PM, Dan Carpenter wrote:
> 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>
>

Thanks, I will merge this change with the commit e93432390ec1.

   -- Daniel

-- 
  <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web