mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda/ca0132 - remove redundant assignment to variable 'changed'
@ 2019-07-04 12:44 Colin King
  2019-07-04 13:17 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2019-07-04 12:44 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Connor McAdams, alsa-devel
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The variable 'changed' is being initialized with a value that is never
read and it is being updated later with a new value. The initialization
is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 sound/pci/hda/patch_ca0132.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c
index c0565437ffed..0d51823d7270 100644
--- a/sound/pci/hda/patch_ca0132.c
+++ b/sound/pci/hda/patch_ca0132.c
@@ -5980,7 +5980,7 @@ static int ca0132_alt_volume_put(struct snd_kcontrol *kcontrol,
 	int ch = get_amp_channels(kcontrol);
 	long *valp = ucontrol->value.integer.value;
 	hda_nid_t vnid = 0;
-	int changed = 1;
+	int changed;
 
 	switch (nid) {
 	case 0x02:
-- 
2.20.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ALSA: hda/ca0132 - remove redundant assignment to variable 'changed'
  2019-07-04 12:44 [PATCH] ALSA: hda/ca0132 - remove redundant assignment to variable 'changed' Colin King
@ 2019-07-04 13:17 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2019-07-04 13:17 UTC (permalink / raw)
  To: Colin King
  Cc: alsa-devel, Connor McAdams, Jaroslav Kysela, kernel-janitors,
	linux-kernel

On Thu, 04 Jul 2019 14:44:25 +0200,
Colin King wrote:
> 
> From: Colin Ian King <colin.king@canonical.com>
> 
> The variable 'changed' is being initialized with a value that is never
> read and it is being updated later with a new value. The initialization
> is redundant and can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied, thanks.


Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-04 13:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-04 12:44 [PATCH] ALSA: hda/ca0132 - remove redundant assignment to variable 'changed' Colin King
2019-07-04 13:17 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®