Merge "ASoC: wcd934x-dsp-cntl: initialize local char array val"
diff --git a/asoc/codecs/wcd934x/wcd934x-dsp-cntl.c b/asoc/codecs/wcd934x/wcd934x-dsp-cntl.c
index 662f484..de4f399 100644
--- a/asoc/codecs/wcd934x/wcd934x-dsp-cntl.c
+++ b/asoc/codecs/wcd934x/wcd934x-dsp-cntl.c
@@ -1011,10 +1011,12 @@
{
struct wcd_dsp_cntl *cntl = container_of(filep->private_data,
struct wcd_dsp_cntl, miscdev);
- char val[WCD_MISCDEV_CMD_MAX_LEN];
+ char val[WCD_MISCDEV_CMD_MAX_LEN + 1];
bool vote;
int ret = 0;
+ memset(val, 0, WCD_MISCDEV_CMD_MAX_LEN + 1);
+
if (count == 0 || count > WCD_MISCDEV_CMD_MAX_LEN) {
pr_err("%s: Invalid count = %zd\n", __func__, count);
ret = -EINVAL;