Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965319AbdCJO1w (ORCPT ); Fri, 10 Mar 2017 09:27:52 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:42614 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933699AbdCJLvI (ORCPT ); Fri, 10 Mar 2017 06:51:08 -0500 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Takashi Iwai" Date: Fri, 10 Mar 2017 11:46:22 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 057/370] ALSA: usb-audio: Fix bogus error return in snd_usb_create_stream() In-Reply-To: X-SA-Exim-Connect-IP: 82.70.136.246 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1043 Lines: 31 3.16.42-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Takashi Iwai commit 4763601a56f155ddf94ef35fc2c41504a2de15f5 upstream. The function returns -EINVAL even if it builds the stream properly. The bogus error code sneaked in during the code refactoring, but it wasn't noticed until now since the returned error code itself is ignored in anyway. Kill it here, but there is no behavior change by this patch, obviously. Fixes: e5779998bf8b ('ALSA: usb-audio: refactor code') Signed-off-by: Takashi Iwai Signed-off-by: Ben Hutchings --- sound/usb/card.c | 1 - 1 file changed, 1 deletion(-) --- a/sound/usb/card.c +++ b/sound/usb/card.c @@ -204,7 +204,6 @@ static int snd_usb_create_stream(struct if (! snd_usb_parse_audio_interface(chip, interface)) { usb_set_interface(dev, interface, 0); /* reset the current interface */ usb_driver_claim_interface(&usb_audio_driver, iface, (void *)-1L); - return -EINVAL; } return 0;