We added an impossible return to silence a static checker warning but it introduced another warning because we need to drop the lock before returning. Fixes: 960a581e22d9 ("ALSA: hda: fix some klockwork scan warnings") Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 90e4ff87445e..0dc18c4a3b1b 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -1808,9 +1808,12 @@ static bool check_non_pcm_per_cvt(struct hda_codec *codec, hda_nid_t cvt_nid) /* Add sanity check to pass klockwork check. * This should never happen. */ - if (WARN_ON(spdif == NULL)) - return true; + if (WARN_ON(spdif == NULL)) { + non_pcm = true; + goto unlock; + } non_pcm = !!(spdif->status & IEC958_AES0_NONAUDIO); +unlock: mutex_unlock(&codec->spdif_mutex); return non_pcm; } -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html