projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d3692cb
)
ASoC: rt5645: fix a NULL pointer dereference
author
Kangjie Lu
<kjlu@umn.edu>
Fri, 15 Mar 2019 03:48:32 +0000
(22:48 -0500)
committer
Mark Brown
<broonie@kernel.org>
Thu, 2 May 2019 01:46:12 +0000
(10:46 +0900)
devm_kcalloc() may fail and return NULL. The fix returns ENOMEM
in case it fails to avoid NULL pointer dereference.
Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt5645.c
patch
|
blob
|
history
diff --git
a/sound/soc/codecs/rt5645.c
b/sound/soc/codecs/rt5645.c
index 9a0751978090a2e6b30000f715d7656bc0078512..f842775dbf2c820a8e9e59194d37b4e682af8d58 100644
(file)
--- a/
sound/soc/codecs/rt5645.c
+++ b/
sound/soc/codecs/rt5645.c
@@
-3419,6
+3419,9
@@
static int rt5645_probe(struct snd_soc_component *component)
RT5645_HWEQ_NUM, sizeof(struct rt5645_eq_param_s),
GFP_KERNEL);
+ if (!rt5645->eq_param)
+ return -ENOMEM;
+
return 0;
}