Message ID | 20200116182304.4926-13-daniel.lezcano@linaro.org |
---|---|
State | Accepted |
Commit | 4341067cfc20582195f47383cf059589b2641465 |
Headers | show |
Series |
|
Related | show |
diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c index bd16efb2740b..269a994d6a99 100644 --- a/drivers/clocksource/timer-ti-dm.c +++ b/drivers/clocksource/timer-ti-dm.c @@ -795,14 +795,14 @@ static int omap_dm_timer_probe(struct platform_device *pdev) return -ENODEV; } - timer->irq = platform_get_irq(pdev, 0); - if (timer->irq < 0) - return timer->irq; - timer = devm_kzalloc(dev, sizeof(*timer), GFP_KERNEL); if (!timer) return -ENOMEM; + timer->irq = platform_get_irq(pdev, 0); + if (timer->irq < 0) + return timer->irq; + timer->fclk = ERR_PTR(-ENODEV); timer->io_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(timer->io_base))