From: Hans de Goede Subject: [PATCH] ASoC: rt5645: del btn_check_timer on remove Date: Wed, 28 Jun 2017 15:01:24 +0200 Message-ID: <20170628130124.30397-1-hdegoede@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by alsa0.perex.cz (Postfix) with ESMTP id 91F1B266BC2 for ; Wed, 28 Jun 2017 15:01:28 +0200 (CEST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Mark Brown , Bard Liao , Oder Chiou Cc: Hans de Goede , alsa-devel@alsa-project.org, Takashi Iwai List-Id: alsa-devel@alsa-project.org The timer may still be running when rt5645_i2c_remove() gets called, call del_timer_sync() to make sure it is stopped. Signed-off-by: Hans de Goede --- sound/soc/codecs/rt5645.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c index d8e7487482c2..e6a3ad17437c 100644 --- a/sound/soc/codecs/rt5645.c +++ b/sound/soc/codecs/rt5645.c @@ -3915,6 +3915,7 @@ static int rt5645_i2c_remove(struct i2c_client *i2c) cancel_delayed_work_sync(&rt5645->jack_detect_work); cancel_delayed_work_sync(&rt5645->rcclock_work); + del_timer_sync(&rt5645->btn_check_timer); snd_soc_unregister_codec(&i2c->dev); regulator_bulk_disable(ARRAY_SIZE(rt5645->supplies), rt5645->supplies); -- 2.13.0