Message ID | 20210205171428.2344210-1-ranjani.sridharan@linux.intel.com |
---|---|
State | New |
Headers | show |
Series | [v2] ASoC: rt5682: Fix panic in rt5682_jack_detect_handler happening during system shutdown | expand |
========= v1 -> v2: cancel both jack detection work diff --git a/sound/soc/codecs/rt5682-i2c.c b/sound/soc/codecs/rt5682-i2c.c index 37d13120f5ba..93c1603b42f1 100644 --- a/sound/soc/codecs/rt5682-i2c.c +++ b/sound/soc/codecs/rt5682-i2c.c @@ -273,6 +273,9 @@ static void rt5682_i2c_shutdown(struct i2c_client *client) { struct rt5682_priv *rt5682 = i2c_get_clientdata(client); + cancel_delayed_work_sync(&rt5682->jack_detect_work); + cancel_delayed_work_sync(&rt5682->jd_check_work); + rt5682_reset(rt5682); }