summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-12-09 19:59:24 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2016-12-09 19:59:24 -0800
commit14665e2c1d1799b6a34564244e2d8643de24869f (patch)
treee778579587e996e84875536a0b81302cf8fd8f12 /sound
parent5641db9743bbe2c590946061b3cc87186d051269 (diff)
parent0d5d87098926b7e9501529556cd90e4fd8ca189d (diff)
Merge "ASoC: qdsp6v2: prevent null pointer dereference for _vol_cmds"
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/msm/qdsp6v2/msm-dts-eagle.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/msm/qdsp6v2/msm-dts-eagle.c b/sound/soc/msm/qdsp6v2/msm-dts-eagle.c
index 7a23a170be67..dfa4bb23c45d 100644
--- a/sound/soc/msm/qdsp6v2/msm-dts-eagle.c
+++ b/sound/soc/msm/qdsp6v2/msm-dts-eagle.c
@@ -234,7 +234,8 @@ static s32 _volume_cmds_alloc1(s32 size)
if (_vol_cmds) {
_vol_cmds_d = kzalloc(_vol_cmd_cnt * sizeof(struct vol_cmds_d),
GFP_KERNEL);
- }
+ } else
+ _vol_cmd_cnt = 0;
if (_vol_cmds_d)
return 0;
_volume_cmds_free();