Skip to contentSkip to conversation

ALSA: hdsp: remove redundant assignment to variable err

PATCH Applied Colin King 2 participants 2 messages Feb 8, 2020 – Feb 10, 2020

Subsystems (2)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 ALSA: hdsp: remove redundant assignment to variable err

From: Colin Ian King <[email protected]>

Variable err is being assigned with a value that is never read, it is assigned a new value in the next statement. The assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")

---
 sound/pci/rme9652/hdsp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
sound/pci/rme9652/hdsp.c +2 -1
index cc06f0a1a7e4..227aece17e39 100644
@@ -3353,7 +3353,8 @@ snd_hdsp_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
 				return;
 			}
 		} else {
-			int err = -EINVAL;
+			int err;
+
 			err = hdsp_request_fw_loader(hdsp);
 			if (err < 0) {
 				snd_iprintf(buffer,
Signature · 1 line
2.25.0
Applied
#1 lore raw
Quoted 9 lines · Colin King

From: Colin Ian King <[email protected]>

Variable err is being assigned with a value that is never read, it is assigned a new value in the next statement. The assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")

Thanks, applied.

Takashi