Skip to contentSkip to conversation

clocksource: timer-imx-gpt: make driver work again

PATCH In review Dan Carpenter 2 participants 2 messages Jun 16, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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')
drivers/clocksource/timer-imx-gpt.c +2 -1
index 5f64dff..f595460 100644
@@ -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)
#1 lore raw
Quoted 5 lines · Dan Carpenter

We accidentally made mxc_timer_init_dt() return unconditionally.

Fixes e93432390ec1 ('clocksource/drivers/timer-imx-gpt: Convert init function to return error')

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

-- Daniel

Signature · 10 lines
  <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

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html