Merge tag 'cleanup2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[linux-3.10.git] / arch / arm / plat-omap / dmtimer.c
index 15e7882..3b0cfeb 100644 (file)
@@ -347,11 +347,12 @@ EXPORT_SYMBOL_GPL(omap_dm_timer_start);
 int omap_dm_timer_stop(struct omap_dm_timer *timer)
 {
        unsigned long rate = 0;
-       struct dmtimer_platform_data *pdata = timer->pdev->dev.platform_data;
+       struct dmtimer_platform_data *pdata;
 
        if (unlikely(!timer))
                return -EINVAL;
 
+       pdata = timer->pdev->dev.platform_data;
        if (!pdata->needs_manual_reset)
                rate = clk_get_rate(timer->fclk);