From patchwork Tue Jul 12 10:26:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin King X-Patchwork-Id: 9225021 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E543A604DB for ; Tue, 12 Jul 2016 10:27:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D6B2227E66 for ; Tue, 12 Jul 2016 10:27:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CB16727EED; Tue, 12 Jul 2016 10:27:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E67F27E66 for ; Tue, 12 Jul 2016 10:27:21 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 31F3626588E; Tue, 12 Jul 2016 12:27:20 +0200 (CEST) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 0EC7C26548D; Tue, 12 Jul 2016 12:27:13 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 81D8D2654D4; Tue, 12 Jul 2016 12:27:11 +0200 (CEST) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by alsa0.perex.cz (Postfix) with ESMTP id A77CF265342 for ; Tue, 12 Jul 2016 12:27:04 +0200 (CEST) Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1bMuu8-0002j5-4H; Tue, 12 Jul 2016 10:27:04 +0000 From: Colin King To: Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org Date: Tue, 12 Jul 2016 11:26:29 +0100 Message-Id: <1468319189-7146-1-git-send-email-colin.king@canonical.com> X-Mailer: git-send-email 2.8.1 Cc: linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH] ALSA: ak4114: remove redundant check on err being < 0 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Colin Ian King snd_ak4114_create checks if the error return err is less than zero or not. This is a redundant check, err can only be < 0 to get to the __fail label, in which case just return err and remove the redundant check (since we never return -EIO). Signed-off-by: Colin Ian King --- sound/i2c/other/ak4114.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/i2c/other/ak4114.c b/sound/i2c/other/ak4114.c index 5a4cf3f..d53c9bb 100644 --- a/sound/i2c/other/ak4114.c +++ b/sound/i2c/other/ak4114.c @@ -121,7 +121,7 @@ int snd_ak4114_create(struct snd_card *card, __fail: snd_ak4114_free(chip); - return err < 0 ? err : -EIO; + return err; } EXPORT_SYMBOL(snd_ak4114_create);