aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_hdmi.c
diff options
context:
space:
mode:
authorLibin Yang <libin.yang@linux.intel.com>2016-06-15 23:13:25 -0400
committerTakashi Iwai <tiwai@suse.de>2016-06-16 04:10:12 -0400
commit960a581e22d93a784db843110ad1e6249c1542a5 (patch)
tree749416a468c7b815232ec33ac3de403953a7e74e /sound/pci/hda/patch_hdmi.c
parent76f64b24e692978a90d3c2e8f57f3a1f0cd7172a (diff)
ALSA: hda: fix some klockwork scan warnings
This patch fixes some warnings from klockwork. These warnings are not the real issues. The patch adds the sanity check. Signed-off-by: Libin Yang <libin.yang@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_hdmi.c')
-rw-r--r--sound/pci/hda/patch_hdmi.c5
1 files changed, 5 insertions, 0 deletions
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)
1680 1680
1681 mutex_lock(&codec->spdif_mutex); 1681 mutex_lock(&codec->spdif_mutex);
1682 spdif = snd_hda_spdif_out_of_nid(codec, cvt_nid); 1682 spdif = snd_hda_spdif_out_of_nid(codec, cvt_nid);
1683 /* Add sanity check to pass klockwork check.
1684 * This should never happen.
1685 */
1686 if (WARN_ON(spdif == NULL))
1687 return true;
1683 non_pcm = !!(spdif->status & IEC958_AES0_NONAUDIO); 1688 non_pcm = !!(spdif->status & IEC958_AES0_NONAUDIO);
1684 mutex_unlock(&codec->spdif_mutex); 1689 mutex_unlock(&codec->spdif_mutex);
1685 return non_pcm; 1690 return non_pcm;