From e2e11bccb8fcd6a4e40608f861cd40e099da863c Mon Sep 17 00:00:00 2001 From: Shuai Li Date: Mon, 22 Jul 2019 14:13:48 +0800 Subject: [PATCH] audio: Fix panic on add_timer [1/1] PD#TV-7920 Problem: Audio drive caused kernel panic. BUG_ON timer_pending. Solution: Add timer will panic calling add_timer. If timer is pending we need use mod_timer to deal with this case. Verify: T962 Change-Id: Ib4143de384af40803609c3513ad07eeb3fe59bbf Signed-off-by: Shuai Li --- sound/soc/amlogic/meson/i2s.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/amlogic/meson/i2s.c b/sound/soc/amlogic/meson/i2s.c index 461fe03e9f4d..c562c1584c2d 100644 --- a/sound/soc/amlogic/meson/i2s.c +++ b/sound/soc/amlogic/meson/i2s.c @@ -463,8 +463,7 @@ static void start_timer(struct aml_runtime_data *prtd) hrtimer_start(&prtd->hrtimer, prtd->wakeups_per_second, HRTIMER_MODE_REL); #else - prtd->timer.expires = jiffies + 1; - add_timer(&prtd->timer); + mod_timer(&prtd->timer, jiffies + 1); #endif #endif prtd->active = 1;