Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp2461905imb; Mon, 4 Mar 2019 05:54:17 -0800 (PST) X-Google-Smtp-Source: APXvYqxf2bWCUyqelTD7awPfljlvSoJ9/XGWNl3nviOxhvSOrQxpY14T0vl9/mVxrfNasPwPfrW6 X-Received: by 2002:a62:2ad1:: with SMTP id q200mr19776545pfq.34.1551707657291; Mon, 04 Mar 2019 05:54:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551707657; cv=none; d=google.com; s=arc-20160816; b=byq5FysPPqi9RUEH4RsvG12oqwOQuwctSCwt+ZQJXKUYftSNlJ9G97Nw0i54M1jWoK uQ7jBpefJz4Kd5rR72YL6aPbva9+qerrfn3YY7DIEyrLFHXuLiWRgdP18bjCFYwhrSPK M0eerAzkHf5ona61jSkHdI1NKuqLrfppMFoWhUJ2EY53cD9tq50FbrflCvug9aYpEbCQ ejw6aIu1yz0DppTzkrocpMFDL8b7C3DhV2EjJjWdGm5Gq5sI/yIGLRrGxiOvhWrx6xyN s6TDcwI6n7gen1titmHSCj2/sxKlOPsaRrI69EQn2Qb6CwHHfF2K5HMze0oNlGUpfgD8 e7Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=+l48uhph2Gs0SOvuWZTi7kJL2zT4n+ZpX+6rDd1IInM=; b=UJeyTr+/6f5G10SvHOd6bopIj102iZFzI/B5PufZ3xMOdIaxkgmV8ZhNRM5a2Qyzfc xcpfFanPUnSX5pU2mb1LskTpCJrX2Y2dVX+YUFoKBRwBpsi5lNi99VClMKGfCRfbsB1n TR9MBedONWA7OQhMQBOjkLWrxEflsCFzET3rNhzEbBklVIr8fcBEfsBQT7cEJZnDL3pv I6hWVG3IZmp+ejhgwBCqJ3FEHH+V50P3M12ad8YKXVzPx4aDCAHU9Jx0nX1ijDNesaeY SsfQSO7ZQ+3KMZOosQXTUQlcLU0titLyZuED3EAOxvZtFQDBdSaZz50jye+rzL2Z+hww qZbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=r9Bq7XRX; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x1si5473879plr.439.2019.03.04.05.54.02; Mon, 04 Mar 2019 05:54:17 -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; dkim=pass header.i=@nvidia.com header.s=n1 header.b=r9Bq7XRX; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726586AbfCDNHk (ORCPT + 99 others); Mon, 4 Mar 2019 08:07:40 -0500 Received: from hqemgate16.nvidia.com ([216.228.121.65]:9124 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726098AbfCDNHk (ORCPT ); Mon, 4 Mar 2019 08:07:40 -0500 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 04 Mar 2019 05:07:38 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Mon, 04 Mar 2019 05:07:39 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Mon, 04 Mar 2019 05:07:39 -0800 Received: from [10.26.11.127] (172.20.13.39) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 4 Mar 2019 13:07:37 +0000 Subject: Re: Regression: ASoC: soc-core: clear platform pointers on error To: Curtis Malainey CC: Mark Brown , Curtis Malainey , linux-tegra , Linux Kernel Mailing List , "alsa-devel@alsa-project.org" References: From: Jon Hunter Message-ID: Date: Mon, 4 Mar 2019 13:07:34 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [172.20.13.39] X-ClientProxiedBy: HQMAIL103.nvidia.com (172.20.187.11) To HQMAIL101.nvidia.com (172.20.187.10) Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1551704858; bh=+l48uhph2Gs0SOvuWZTi7kJL2zT4n+ZpX+6rDd1IInM=; h=X-PGP-Universal:Subject:To:CC:References:From:Message-ID:Date: User-Agent:MIME-Version:In-Reply-To:X-Originating-IP: X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=r9Bq7XRXkyYj02QjW0P4jBtQvhp72Gpr1l+B1cAwJAL+kYtPKSnEloex5/Tq1PP+w yU4H6ycq/cfjHpCzNRCoZp4KTYES8IObgYLdW5QacaSrZIB9YrV3EFMfqVxLc5Pzgw cIIUcYnCB1wFRVL6xOORX/O6v8wrfz/prM7uCpaDC/cPndhDU3VXatl/zvMCXLqXrQ XYavqRjWKX4wMPxUQJQRBdcOIbHegFKSsYHKG2AKkh2dX+h9U/Rqw2+yG8uaMQ1Hb1 zDe0dL2u6L35Fmgwzkyp7PBIXQuE7bzRFU0HcIUW0aE/cKNYM1mVUrC8Ff2/LEshos 75tZ7rd6YFc8A== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/03/2019 17:28, Curtis Malainey wrote: > On Fri, Mar 1, 2019 at 4:07 AM Jon Hunter wrote: >> >> Hi Mark, Curtis, >> >> I am seeing a regression on -next where the soundcard on one of our >> Tegra boards fails to initialise following a probe deferral. The bisect >> points to the commit 78a24e10cd94420f1b4e2dc5923ae7109e2aaba1 ('ASoC: >> soc-core: clear platform pointers on error') and reverting this on top >> of -next fixes the problem. >> >> Looking at the bootlog from the failure I see ... >> >> tegra-snd-wm8903 sound: ASoC: failed to init link WM8903 >> >> tegra-snd-wm8903 sound: snd_soc_register_card failed (-517) >> >> tegra30-i2s 70080400.i2s: DMA channels sourced from device 70080000.ahub >> >> tegra-snd-wm8903 sound: ASoC: Both platform name/of_node are set for WM8903 >> >> tegra-snd-wm8903 sound: ASoC: failed to init link WM8903 >> >> tegra-snd-wm8903 sound: snd_soc_register_card failed (-22) >> >> tegra-snd-wm8903: probe of sound failed with error -22 >> >> >> With the above change I see soc_cleanup_platform() is ever being called >> when the probe is deferred and hence leads to the failure. Note that the >> initial failure, "ASoC: failed to init link WM8903" occurs very early >> in snd_soc_register_card() when initialising the prelinks. >> >> The following fixes it, but I have not scrutinised the code to see if >> there are other exit points that we need to handle. >> > You are indeed correct. That should be there. I think I got confused > when I was doing my initial debugging on our local 4.19 kernel as the > cleanup code had changed when I was testing on -next and forgot to add > this to my upstream patch and it wasn't caught in my testing. Thanks > for catching this. I went back and looked and it appears that is the > only call to soc_init_dai_link that is outside soc_instantiate_card > and therefore not caught by the original patch's cleanup routine. Do > you want to submit a patch and I'll add my signoff? Thanks. I will send out a patch shortly. Cheers Jon -- nvpublic