Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp9973463ybl; Thu, 26 Dec 2019 08:32:07 -0800 (PST) X-Google-Smtp-Source: APXvYqysS2rFIkvUdhOwdaBqVNL3Byhok6MXzHWs0qRCbbN67xAQKybkwsbnz7hUjKpL/AvlgKNM X-Received: by 2002:aca:f10:: with SMTP id 16mr2239408oip.117.1577377927213; Thu, 26 Dec 2019 08:32:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577377927; cv=none; d=google.com; s=arc-20160816; b=F1hXOMgc8J7mCjA553BkWm9QSPs4B+IzMOV4M+lRU2eI4H+rMhR3rh6m3sA4CrQbzU OQQDLtc/YF2lb2lDdIqORTe6xjTmU1u1H0Dww3lrhweMGZpM7XBtc7fio2OHer3HFgST JQ5iXHrKrOd907IiV4HhMh/NDn6+ElfxYolvOY5YM9it6gd4zhzDLbLWiwTSO6js0jvl Ut8TTwodrsyEJTQA88nCg9jFkdfVLLQ/LVbeuARlCeWYvmFxIjOlsrOFOv7H9JgzjYKP 99VDjsG+S0T85HEE43vGY1753/jEwl+r4kGYuzjMEBNpAfv8JilWQxQSaeBqXZ0jlZRo MPeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=P1iRcfW9yTb3PakP6XU8ChsHxMsIx3dTcucNFHOepSM=; b=Tf/zYtuHfGhlN4kH477L8yO8l6WPQPvkKsftuLQX7SiR3iPcWj2uhTt2umHnqZzl3H HjymzcXfsAAGIOjEf4aHElhKvTy1cLHg0QCzAhTaZ+hL4LgXIiVIjj8sfYLx2Lbvq77M aWGZ75b+Olav/3EgxKRXFFzyFQkL7Ry/fg9C0rxJCbhC06lAcUYepyhCMWzP78cYdfEV KLI1iJucbGQvz4zDkWyzx31pHoq5/f9mhCxC8UB0i7GkHM9yziEtj86S4l/raQZgorUZ Qu+VszbPGaT5WNyjmMr2cjHKCzNXtkXnSkX0APWY2x4GQ7z5QWt1bHVx0AiXwm+SLEEH r1uA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q2si13187970otn.220.2019.12.26.08.31.56; Thu, 26 Dec 2019 08:32:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726643AbfLZQbO (ORCPT + 99 others); Thu, 26 Dec 2019 11:31:14 -0500 Received: from smtp05.smtpout.orange.fr ([80.12.242.127]:43890 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726236AbfLZQbO (ORCPT ); Thu, 26 Dec 2019 11:31:14 -0500 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 Cc: alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH] ASoC: cs47l92: Simplify error handling code in 'cs47l92_probe()' 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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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]); -- 2.20.1