From: Dan Carpenter Date: Wed, 8 Jan 2020 05:37:06 +0000 (+0300) Subject: ALSA: control: potential uninitialized return value X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=3b2549a3740efb8af0150415737067d87e466c5b;p=openwrt%2Fstaging%2Fblogic.git 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 Link: https://lore.kernel.org/r/20200108053706.h3hcnvmnf62wkjac@kili.mountain Signed-off-by: Takashi Iwai --- 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) {