aboutsummaryrefslogtreecommitdiff
path: root/sound/core
diff options
context:
space:
mode:
authorDan Carpenter2020-01-08 08:37:06 +0300
committerTakashi Iwai2020-01-08 07:20:28 +0100
commit3b2549a3740efb8af0150415737067d87e466c5b (patch)
tree766ae570cb64c819dc649c26ae43938933635142 /sound/core
parentf1dd4795b1523fbca7ab4344dd5a8bb439cc770d (diff)
ALSA: control: potential uninitialized return value
Smatch complains that "ret" might be uninitialized. Fixes: fbd3eb7f66c5 ("ALSA: control: Add verification for kctl accesses") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20200108053706.h3hcnvmnf62wkjac@kili.mountain Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/control.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/control.c b/sound/core/control.c
index d06033d418a8..aa0c0cf182af 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -896,7 +896,7 @@ static int sanity_check_elem_value(struct snd_card *card,
u32 pattern)
{
size_t offset;
- int i, ret;
+ int i, ret = 0;
u32 *p;
switch (info->type) {