Merge tag 'sound-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
[sfrench/cifs-2.6.git] / sound / soc / intel / boards / sof_sdw_rt711.c
index 49ff0871e9e776743b6f36d5a37499868d4a9b19..8291967f23f30f0ccac487fb2b6b3db32704c133 100644 (file)
@@ -139,6 +139,9 @@ int sof_sdw_rt711_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_l
 {
        struct mc_private *ctx = snd_soc_card_get_drvdata(card);
 
+       if (!ctx->headset_codec_dev)
+               return 0;
+
        device_remove_software_node(ctx->headset_codec_dev);
        put_device(ctx->headset_codec_dev);