* [alsa-devel] [PATCH] ALSA: control: potential uninitialized return value
@ 2020-01-08 5:37 Dan Carpenter
2020-01-08 6:21 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2020-01-08 5:37 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai
Cc: alsa-devel, kernel-janitors, Kirill Smelkov, Allison Randal
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>
---
sound/core/control.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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) {
--
2.11.0
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [alsa-devel] [PATCH] ALSA: control: potential uninitialized return value
2020-01-08 5:37 [alsa-devel] [PATCH] ALSA: control: potential uninitialized return value Dan Carpenter
@ 2020-01-08 6:21 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2020-01-08 6:21 UTC (permalink / raw)
To: Dan Carpenter; +Cc: alsa-devel, kernel-janitors, Kirill Smelkov, Allison Randal
On Wed, 08 Jan 2020 06:37:06 +0100,
Dan Carpenter wrote:
>
> 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>
Applied, thanks.
Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-01-08 6:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-08 5:37 [alsa-devel] [PATCH] ALSA: control: potential uninitialized return value Dan Carpenter
2020-01-08 6:21 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).