* [PATCH][next] ALSA: i2c: tea6330t: Remove redundant initialization of variable err
@ 2021-06-11 16:52 Colin King
2021-06-12 7:32 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2021-06-11 16:52 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai, alsa-devel; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The variable err is being initialized with a value that is never read,
it is being updated later on. The assignment is redundant and can be
removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
sound/i2c/tea6330t.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/i2c/tea6330t.c b/sound/i2c/tea6330t.c
index 742d0f724375..037d6293f728 100644
--- a/sound/i2c/tea6330t.c
+++ b/sound/i2c/tea6330t.c
@@ -284,7 +284,7 @@ int snd_tea6330t_update_mixer(struct snd_card *card,
struct tea6330t *tea;
const struct snd_kcontrol_new *knew;
unsigned int idx;
- int err = -ENOMEM;
+ int err;
u8 default_treble, default_bass;
unsigned char bytes[7];
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][next] ALSA: i2c: tea6330t: Remove redundant initialization of variable err
2021-06-11 16:52 [PATCH][next] ALSA: i2c: tea6330t: Remove redundant initialization of variable err Colin King
@ 2021-06-12 7:32 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2021-06-12 7:32 UTC (permalink / raw)
To: Colin King
Cc: Jaroslav Kysela, Takashi Iwai, alsa-devel, kernel-janitors, linux-kernel
On Fri, 11 Jun 2021 18:52:23 +0200,
Colin King wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable err is being initialized with a value that is never read,
> it is being updated later on. The assignment is redundant and can be
> removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Thanks, applied.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-12 7:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-11 16:52 [PATCH][next] ALSA: i2c: tea6330t: Remove redundant initialization of variable err Colin King
2021-06-12 7:32 ` 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).