sound:hdmi:fix without unlocked before return
PATCH 1/1 sound:hdmi:fix without unlocked before return
Fix the following coccicheck warning:
sound/pci/hda/patch_hdmi.c:1852:2-8: preceding lock on line 1846
After add sanity check to pass klockwork check, The spdif_mutex should be unlock before return true in check_non_pcm_per_cvt().
--- sound/pci/hda/patch_hdmi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
sound/pci/hda/patch_hdmi.c +3 -1
@@ -1848,8 +1848,10 @@ 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 )) +if (WARN_ON (spdif ==NULL )) { +mutex_unlock (&codec->spdif_mutex);return true; + } non_pcm = !!(spdif->status &IEC958_AES0_NONAUDIO );mutex_unlock (&codec->spdif_mutex);return non_pcm;
Signature · 1 line
1.8.3.1
Quoted 9 lines · Wu Bo
Fix the following coccicheck warning:
sound/pci/hda/patch_hdmi.c:1852:2-8: preceding lock on line 1846After add sanity check to pass klockwork check, The
spdif_mutexshould be unlock before return true incheck_non_pcm_per_cvt().Signed-off-by Wu Bo <[email protected]>
Applied now with the correction of subject and Fixes tag as well as Cc-to-stable tag.
thanks,
Takashi
Quoted 16 lines · Takashi Iwai
Quoted 9 lines · Wu Bo
Fix the following coccicheck warning:
sound/pci/hda/patch_hdmi.c:1852:2-8: preceding lock on line 1846After add sanity check to pass klockwork check, The
spdif_mutexshould be unlock before return true incheck_non_pcm_per_cvt().Signed-off-by Wu Bo <[email protected]>Applied now with the correction of subject and Fixes tag as well as Cc-to-stable tag.
Quoted 6 lines
thanks,
Takashi
.
Thank you, I am sorry to forget to modify the V2 Patch version in time.
thanks,
Wu Bo