* [PATCH] ALSA: usb-audio: remove redundant check on err
@ 2018-06-04 11:49 Colin King
2018-06-04 11:53 ` [alsa-devel] " Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2018-06-04 11:49 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai, alsa-devel; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
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")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
sound/usb/mixer_quirks.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c
index 4149543f613e..e82a72fea9a1 100644
--- a/sound/usb/mixer_quirks.c
+++ b/sound/usb/mixer_quirks.c
@@ -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 */
--
2.17.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [alsa-devel] [PATCH] ALSA: usb-audio: remove redundant check on err
2018-06-04 11:49 [PATCH] ALSA: usb-audio: remove redundant check on err Colin King
@ 2018-06-04 11:53 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2018-06-04 11:53 UTC (permalink / raw)
To: Colin King; +Cc: Jaroslav Kysela, alsa-devel, kernel-janitors, linux-kernel
On Mon, 04 Jun 2018 13:49:19 +0200,
Colin King wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> 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")
>
> 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:[~2018-06-04 11:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-04 11:49 [PATCH] ALSA: usb-audio: remove redundant check on err Colin King
2018-06-04 11:53 ` [alsa-devel] " 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).