All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] clocksource: timer-imx-gpt: make driver work again
@ 2016-06-16 10:42 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2016-06-16 10:42 UTC (permalink / raw)
  To: Daniel Lezcano; +Cc: Thomas Gleixner, linux-kernel, kernel-janitors

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)

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-06-16 11:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-16 10:42 [patch] clocksource: timer-imx-gpt: make driver work again Dan Carpenter
2016-06-16 10:42 ` Dan Carpenter
2016-06-16 11:04 ` Daniel Lezcano
2016-06-16 11:04   ` Daniel Lezcano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.