From patchwork Thu Dec 26 16:29:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 11310621 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4306C14B7 for ; Thu, 26 Dec 2019 16:32:11 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 53A7920828 for ; Thu, 26 Dec 2019 16:32:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="Xfzi1HnD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 53A7920828 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=wanadoo.fr Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 5A85916FA; Thu, 26 Dec 2019 17:31:18 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5A85916FA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1577377928; bh=J5EnA8AouA8kJBellF3P/hL7CBK/TUzrTCa66zMWRPo=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=Xfzi1HnD6L7hLebkoEOBBrbtVoyhjs16yDsXDJ/WN3MXNG7w3JdDexNG+gjs+ahz6 Zx3AiuZ0h2b5Aq3+HqK878dUfmVjMAMnwvPMRS0A6MQy9LBdiAGMOZr5vlxx56nulc ohrE7CyqRR8hqO9oJTPvRp7ZbxdVKhruLcB4gyGo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C0706F80138; Thu, 26 Dec 2019 17:31:17 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 91BE4F80139; Thu, 26 Dec 2019 17:31:16 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=KHOP_HELO_FCRDNS, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=disabled version=3.4.0 Received: from smtp.smtpout.orange.fr (smtp05.smtpout.orange.fr [80.12.242.127]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 7A027F8012E for ; Thu, 26 Dec 2019 17:31:12 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7A027F8012E Received: from localhost.localdomain ([90.40.29.152]) by mwinf5d81 with ME id igX92100B3Gv28S03gX9u9; Thu, 26 Dec 2019 17:31:12 +0100 X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Thu, 26 Dec 2019 17:31:12 +0100 X-ME-IP: 90.40.29.152 From: Christophe JAILLET To: brian.austin@cirrus.com, Paul.Handrigan@cirrus.com, ckeepax@opensource.cirrus.com, rf@opensource.cirrus.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com Date: Thu, 26 Dec 2019 17:29:07 +0100 Message-Id: <20191226162907.9490-1-christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Cc: patches@opensource.cirrus.com, alsa-devel@alsa-project.org, Christophe JAILLET , kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH] ASoC: cs47l92: Simplify error handling code in 'cs47l92_probe()' X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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" If 'madera_init_bus_error_irq()' fails, 'wm_adsp2_remove(&cs47l92->core.adsp[0])' will be called twice. Once in the 'if' block, and once in the error handling path. This is harmless, but one of this call can be axed. Signed-off-by: Christophe JAILLET Acked-by: Charles Keepax --- sound/soc/codecs/cs47l92.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/soc/codecs/cs47l92.c b/sound/soc/codecs/cs47l92.c index d50f75f3b3e4..536b7d35d6b2 100644 --- a/sound/soc/codecs/cs47l92.c +++ b/sound/soc/codecs/cs47l92.c @@ -1959,10 +1959,8 @@ static int cs47l92_probe(struct platform_device *pdev) goto error_dsp_irq; ret = madera_init_bus_error_irq(&cs47l92->core, 0, wm_adsp2_bus_error); - if (ret != 0) { - wm_adsp2_remove(&cs47l92->core.adsp[0]); + if (ret != 0) goto error_adsp; - } madera_init_fll(madera, 1, MADERA_FLL1_CONTROL_1 - 1, &cs47l92->fll[0]);