From patchwork Thu Dec 6 22:24:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ladislav Michl X-Patchwork-Id: 10717127 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C67A313BF for ; Thu, 6 Dec 2018 22:26:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B66672A3C9 for ; Thu, 6 Dec 2018 22:26:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AAECF2D817; Thu, 6 Dec 2018 22:26:19 +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=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,UNPARSEABLE_RELAY 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 C95E62A3C9 for ; Thu, 6 Dec 2018 22:26:18 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 78028267CA7; Thu, 6 Dec 2018 23:26:17 +0100 (CET) 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 DFC75267CAD; Thu, 6 Dec 2018 23:26:14 +0100 (CET) Received: from cvs.linux-mips.org (eddie.linux-mips.org [148.251.95.138]) by alsa0.perex.cz (Postfix) with ESMTP id 5A5E1267CA4 for ; Thu, 6 Dec 2018 23:26:11 +0100 (CET) Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S23990411AbeLFWYXY4dWP (ORCPT ); Thu, 6 Dec 2018 23:24:23 +0100 Date: Thu, 6 Dec 2018 23:24:22 +0100 From: Ladislav Michl To: Stephen Rothwell Message-ID: <20181206222422.GA29787@lenoch> References: <20181207080122.20d3d342@canb.auug.org.au> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20181207080122.20d3d342@canb.auug.org.au> User-Agent: Mutt/1.10.1 (2018-07-13) Cc: alsa-devel@alsa-project.org, Kuninori Morimoto , anish kumar , Mark Brown , Liam Girdwood , Linux Kernel Mailing List , Linux Next Mailing List Subject: [alsa-devel] [PATCH v2] ASoC: max9867: Remove useless assignment 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP ret is assigned later, no need to initialize it. Signed-off-by: Ladislav Michl --- CHANGES: -v2: add missing Signed-off-by (I'm sorry for that...) sound/soc/codecs/max9867.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/max9867.c b/sound/soc/codecs/max9867.c index 1cda54b59854..1b155f40b106 100644 --- a/sound/soc/codecs/max9867.c +++ b/sound/soc/codecs/max9867.c @@ -476,7 +476,7 @@ static int max9867_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) { struct max9867_priv *max9867; - int ret = 0, reg; + int ret, reg; max9867 = devm_kzalloc(&i2c->dev, sizeof(*max9867), GFP_KERNEL); if (!max9867) @@ -497,10 +497,8 @@ static int max9867_i2c_probe(struct i2c_client *i2c, dev_info(&i2c->dev, "device revision: %x\n", reg); ret = devm_snd_soc_register_component(&i2c->dev, &max9867_component, max9867_dai, ARRAY_SIZE(max9867_dai)); - if (ret < 0) { + if (ret < 0) dev_err(&i2c->dev, "Failed to register component: %d\n", ret); - return ret; - } return ret; }