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@xxxxxxxxxx> 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) -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html