From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753805AbcGLK1I (ORCPT ); Tue, 12 Jul 2016 06:27:08 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:49973 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752964AbcGLK1G (ORCPT ); Tue, 12 Jul 2016 06:27:06 -0400 From: Colin King To: Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH] ALSA: ak4114: remove redundant check on err being < 0 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 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); -- 2.8.1