MLK-11933 mfd: mxc-hdmi-core: null check substream before using it
null check substream before using it. Reported by coverity. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> (cherry picked from commit fad2b9c1285a34eab0dec9f90edc06ec94e70a61)
This commit is contained in:
parent
6794747bde
commit
131e7697fb
|
@ -153,9 +153,12 @@ int mxc_hdmi_register_audio(struct snd_pcm_substream *substream)
|
|||
unsigned long flags, flags1;
|
||||
int ret = 0;
|
||||
|
||||
if (!substream)
|
||||
return -EINVAL;
|
||||
|
||||
snd_pcm_stream_lock_irqsave(substream, flags);
|
||||
|
||||
if (substream && check_hdmi_state()) {
|
||||
if (check_hdmi_state()) {
|
||||
spin_lock_irqsave(&hdmi_audio_lock, flags1);
|
||||
if (hdmi_audio_stream_playback) {
|
||||
pr_err("%s unconsist hdmi auido stream!\n", __func__);
|
||||
|
|
Loading…
Reference in a new issue