summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/hdac_hda.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-22 09:05:34 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-22 09:05:34 +0100
commitc318f074d9fdeae16e19cbb2ed53b50d2bcdfdb8 (patch)
tree44c6552fa919dfe1fc681949bf5d81fcf6a2beb8 /sound/soc/codecs/hdac_hda.c
parentMerge tag 'iio-for-5.6b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic... (diff)
parentLinux 5.5-rc7 (diff)
downloadlinux-c318f074d9fdeae16e19cbb2ed53b50d2bcdfdb8.tar.xz
linux-c318f074d9fdeae16e19cbb2ed53b50d2bcdfdb8.zip
Merge 5.5-rc7 into staging-next
We want the staging fixes in here as well Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/soc/codecs/hdac_hda.c')
-rw-r--r--sound/soc/codecs/hdac_hda.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/codecs/hdac_hda.c b/sound/soc/codecs/hdac_hda.c
index 6803d39e09a5..43110151e928 100644
--- a/sound/soc/codecs/hdac_hda.c
+++ b/sound/soc/codecs/hdac_hda.c
@@ -588,7 +588,9 @@ static int hdac_hda_dev_remove(struct hdac_device *hdev)
struct hdac_hda_priv *hda_pvt;
hda_pvt = dev_get_drvdata(&hdev->dev);
- cancel_delayed_work_sync(&hda_pvt->codec.jackpoll_work);
+ if (hda_pvt && hda_pvt->codec.registered)
+ cancel_delayed_work_sync(&hda_pvt->codec.jackpoll_work);
+
return 0;
}