Skip to contentSkip to conversation

ALSA: opti9xx: fix missing { } around an if block

PATCH Applied Colin King 2 participants 2 messages Jul 20, 2021

Subsystems (2)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 ALSA: opti9xx: fix missing { } around an if block

From: Colin Ian King <[email protected]>

Currently the { } braces are missing around an if block causing subsequent code after the return to become unreachable. Fix this by adding the missing { }.

Addresses-Coverity: ("Structurally dead code")

Fixes 2973ee4a5b54 ("ALSA: opti9xx: Allocate resources with device-managed APIs")
---
 sound/isa/opti9xx/opti92x-ad1848.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
sound/isa/opti9xx/opti92x-ad1848.c +2 -1
index 8988de8cca96..4beeb32fe2a7 100644
@@ -1096,9 +1096,10 @@ static int snd_opti9xx_pnp_probe(struct pnp_card_link *pcard,
 	if (error)
 		return error;
 	error = snd_opti9xx_read_check(card, chip);
-	if (error)
+	if (error) {
 		snd_printk(KERN_ERR "OPTI chip not found\n");
 		return error;
+	}
 	error = snd_opti9xx_probe(card);
 	if (error < 0)
 		return error;
Signature · 1 line
2.31.1
Applied
#1 lore raw
Quoted 10 lines · Colin King

From: Colin Ian King <[email protected]>

Currently the { } braces are missing around an if block causing subsequent code after the return to become unreachable. Fix this by adding the missing { }.

Addresses-Coverity: ("Structurally dead code")

Fixes 2973ee4a5b54 ("ALSA: opti9xx: Allocate resources with device-managed APIs")

Thanks, applied.

Takashi