Skip to contentSkip to conversation

ALSA: usb-audio: remove redundant check on err

PATCH Applied Colin King 2 participants 2 messages Jun 4, 2018

Subsystems (2)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 ALSA: usb-audio: remove redundant check on err

From: Colin Ian King <[email protected]>

The check on err is redundant as both the true and false paths end up on a break statement. Remove the redundant check.

Detected by CoverityScan, CID#1268773 ("Identical code for different branches")

---
 sound/usb/mixer_quirks.c | 2 --
 1 file changed, 2 deletions(-)
sound/usb/mixer_quirks.c +0 -2
index 4149543f613e..e82a72fea9a1 100644
@@ -1849,8 +1849,6 @@ int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer)
 	/* EMU0204 */
 	case USB_ID(0x041e, 0x3f19):
 		err = snd_emu0204_controls_create(mixer);
-		if (err < 0)
-			break;
 		break;
 
 	case USB_ID(0x0763, 0x2030): /* M-Audio Fast Track C400 */
Signature · 1 line
2.17.0
Applied
#1 lore raw
Quoted 10 lines · Colin King

From: Colin Ian King <[email protected]>

The check on err is redundant as both the true and false paths end up on a break statement. Remove the redundant check.

Detected by CoverityScan, CID#1268773 ("Identical code for different branches")

Applied, thanks.

Takashi