Skip to contentSkip to conversation

ALSA: hda/hdmi: remove redundant assignment to variable pcm_idx

PATCH Applied Colin King 2 participants 2 messages Sep 5, 2019

Subsystems (2)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 ALSA: hda/hdmi: remove redundant assignment to variable pcm_idx

From: Colin Ian King <[email protected]>

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")

---
 sound/pci/hda/patch_hdmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/hda/patch_hdmi.c +1 -1
index 83b8b9d27711..bca5de78e9ad 100644
@@ -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;
Signature · 1 line
2.20.1
Applied
#1 lore raw
Quoted 9 lines · Colin King

From: Colin Ian King <[email protected]>

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")

Applied, thanks.

Takashi