* [PATCH] ALSA: hda/hdmi: remove redundant assignment to variable pcm_idx
@ 2019-09-05 15:48 Colin King
2019-09-05 17:47 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2019-09-05 15:48 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai, alsa-devel; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Variable pcm_idx is being initialized with a value that is never read
and is being re-assigned immediately afterwards. The assignment is
redundant and hence can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
sound/pci/hda/patch_hdmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 83b8b9d27711..bca5de78e9ad 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -1440,7 +1440,7 @@ static bool update_eld(struct hda_codec *codec,
struct hdmi_spec *spec = codec->spec;
bool old_eld_valid = pin_eld->eld_valid;
bool eld_changed;
- int pcm_idx = -1;
+ int pcm_idx;
/* for monitor disconnection, save pcm_idx firstly */
pcm_idx = per_pin->pcm_idx;
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ALSA: hda/hdmi: remove redundant assignment to variable pcm_idx
2019-09-05 15:48 [PATCH] ALSA: hda/hdmi: remove redundant assignment to variable pcm_idx Colin King
@ 2019-09-05 17:47 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2019-09-05 17:47 UTC (permalink / raw)
To: Colin King; +Cc: alsa-devel, Jaroslav Kysela, kernel-janitors, linux-kernel
On Thu, 05 Sep 2019 17:48:26 +0200,
Colin King wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> Variable pcm_idx is being initialized with a value that is never read
> and is being re-assigned immediately afterwards. The assignment is
> redundant and hence 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-09-05 17:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-05 15:48 [PATCH] ALSA: hda/hdmi: remove redundant assignment to variable pcm_idx Colin King
2019-09-05 17:47 ` 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).