projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
24ff901
)
MLK-11933 mfd: mxc-hdmi-core: null check substream before using it
author
Zidan Wang
<zidan.wang@freescale.com>
Tue, 1 Dec 2015 08:14:26 +0000
(16:14 +0800)
committer
Nitin Garg
<nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:49:27 +0000
(14:49 -0500)
null check substream before using it. Reported by coverity.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
(cherry picked from commit
fad2b9c1285a34eab0dec9f90edc06ec94e70a61
)
drivers/mfd/mxc-hdmi-core.c
patch
|
blob
|
history
diff --git
a/drivers/mfd/mxc-hdmi-core.c
b/drivers/mfd/mxc-hdmi-core.c
index
ca79e7e
..
a670406
100644
(file)
--- a/
drivers/mfd/mxc-hdmi-core.c
+++ b/
drivers/mfd/mxc-hdmi-core.c
@@
-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__);