OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
51dd97d
)
ASoC: cs43130: fix a NULL pointer dereference
author
Kangjie Lu
<kjlu@umn.edu>
Fri, 15 Mar 2019 03:51:20 +0000
(22:51 -0500)
committer
Mark Brown
<broonie@kernel.org>
Thu, 2 May 2019 01:46:13 +0000
(10:46 +0900)
In case create_singlethread_workqueue fails, the fix returns
-ENOMEM to avoid potential NULL pointer dereference.
Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs43130.c
patch
|
blob
|
history
diff --git
a/sound/soc/codecs/cs43130.c
b/sound/soc/codecs/cs43130.c
index
3f7b255
..
80d6727
100644
(file)
--- a/
sound/soc/codecs/cs43130.c
+++ b/
sound/soc/codecs/cs43130.c
@@
-2322,6
+2322,8
@@
static int cs43130_probe(struct snd_soc_component *component)
return ret;
cs43130->wq = create_singlethread_workqueue("cs43130_hp");
+ if (!cs43130->wq)
+ return -ENOMEM;
INIT_WORK(&cs43130->work, cs43130_imp_meas);
}