X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=sound%2Fpci%2Fhda%2Fpatch_hdmi.c;h=56e5204ac9c1ee10e66909bd58a921159ed42703;hb=0603006b450004213eeed22d4fbcc103c994c2e6;hp=d0d5ad8beac565b8e5bee7bb61f6e692081083ec;hpb=797cee982eef9195736afc5e7f3b8f613c41d19a;p=karo-tx-linux.git diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index d0d5ad8beac5..56e5204ac9c1 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -1680,6 +1680,11 @@ static bool check_non_pcm_per_cvt(struct hda_codec *codec, hda_nid_t cvt_nid) mutex_lock(&codec->spdif_mutex); spdif = snd_hda_spdif_out_of_nid(codec, cvt_nid); + /* Add sanity check to pass klockwork check. + * This should never happen. + */ + if (WARN_ON(spdif == NULL)) + return true; non_pcm = !!(spdif->status & IEC958_AES0_NONAUDIO); mutex_unlock(&codec->spdif_mutex); return non_pcm;