Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp604606imm; Wed, 17 Oct 2018 05:34:50 -0700 (PDT) X-Google-Smtp-Source: ACcGV608xbNnynXZAG3CCRxqNsOAliGk72y75s/GQ+EBMQoPnMM6FLoeiDJwDwGxDtI/RBA7evbk X-Received: by 2002:a17:902:74c1:: with SMTP id f1-v6mr13867337plt.99.1539779690581; Wed, 17 Oct 2018 05:34:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539779690; cv=none; d=google.com; s=arc-20160816; b=NF+OOdIBY2CknEJAm/l/cqMDOEaYqIYKDtUKRdl/J2yKSpuYvkxks4c26iXINTDgC9 Zr95UFuRa771kGr16qmGbSh3IDuO8NJh6xcOUVbHGDA7fZqXdgMK24BvxBtZdR0KX1gW sRZTfw4EQo8fRTyKm3beJTgEbbMj3ImdqzZGqVUOkYs8n7qEjeyRsx2qOv0omZ/mH8sj VYNDFdrJVy2xahCDJfA6xy6ykH3A8HTXyKoviILznGM1ECaqBYc9TTUW3UXT/Ew8SVDR rbjAeQShEvtzON4rhE1iCohViefsEar7s53P2MwoA6zEw5Yak48YDt6ufIzdWgUb6Xkl 3nGg== 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=YL2JHS4TpWtu7co5aSzUufDQkFRW1ZFRW2N+mCZc1BI=; b=bbIgE4KzAVLSeffmGlu8AC9Yn4UMJP0RU5xcyAvkJfPBnbfqcQBj8vdH/2nDoF2FrC H5CQvT4H9kSxa2DqUblKyQMMvFBonWBJgJJhCx9OuanKqi1rc2JhSX/PSvmCtzQaC/Qu d7fW6fMpedkB9APNo3z40jmAfyjT/0rYRGSCYfMkSBUWtoX3ynerYS0LtOG5YRkEFl4z pLxzJLOeFgSo9n79H4u2EJJUnKP0xmmLnm0EnpqNlgnvDWHnG3ThVA/7nG6osC6xrm/1 b+QkSXILOhhYfLLFdAXJFudqP2HZIBVjNxPrw8WoAS8h1sfiOZ7AfyITYyJTx/xGGeEo rldA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=oOPh1kch; 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 j20-v6si17190426pgl.279.2018.10.17.05.34.34; Wed, 17 Oct 2018 05:34:50 -0700 (PDT) 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=oOPh1kch; 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 S1727188AbeJQU2O (ORCPT + 99 others); Wed, 17 Oct 2018 16:28:14 -0400 Received: from hqemgate15.nvidia.com ([216.228.121.64]:9221 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726974AbeJQU2O (ORCPT ); Wed, 17 Oct 2018 16:28:14 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate15.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Wed, 17 Oct 2018 05:32:41 -0700 Received: from HQMAIL101.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Wed, 17 Oct 2018 05:32:44 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Wed, 17 Oct 2018 05:32:44 -0700 Received: from [10.26.11.110] (10.124.1.5) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 17 Oct 2018 12:32:40 +0000 Subject: Re: [PATCH v2 9/9] ASoC: tegra_sgtl5000: fix platform name vs. of_node assignement To: Marcel Ziswiler , , , CC: Russell King - ARM Linux , Mark Brown , Kuninori Morimoto , Marcel Ziswiler , Jaroslav Kysela , , Thierry Reding , Takashi Iwai , Liam Girdwood References: <20181016104730.4598-1-marcel@ziswiler.com> <20181016104730.4598-10-marcel@ziswiler.com> From: Jon Hunter Message-ID: <35848cb7-36ee-6698-ff17-7f0e73567914@nvidia.com> Date: Wed, 17 Oct 2018 13:32:37 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181016104730.4598-10-marcel@ziswiler.com> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) 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=1539779561; bh=YL2JHS4TpWtu7co5aSzUufDQkFRW1ZFRW2N+mCZc1BI=; 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=oOPh1kch0g5C7EpaKxbncLQE0wz7yLsvVOB8qDvEonjiyMBL76FRjAqhP2eUAysfu 3cbWZo8q7da8MTK1Ftvykr61fyFfC74pqLGfKQ1+dBIlQjqYcDQNFjMHWvN8hbe5tX 2RmOdc9YIWBS3r4RP9MZRgYd7c6RryinNe02fNQzRZPx2FW1waBAxI5mIv3D4Rk5DD Xo1gwjDNQ7PQYNLWR7j9VpYDhZ8m13IqK8tMjhQW8q+3MUzkVSG73bHeFtJbUfszqm BUotIw1TxciZi77flF9ESeXUoOuy5nC6ys5Yv/EpX3b7zekjCV8QRkO2JOGptEBa+D SBiNcyNiZQGqg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16/10/2018 11:47, Marcel Ziswiler wrote: > From: Marcel Ziswiler > > This fixes the following error as seen post commit daecf46ee0e5 > ("ASoC: soc-core: use snd_soc_dai_link_component for platform"): > > tegra-snd-sgtl5000 sound: ASoC: Both platform name/of_node are set for > sgtl5000 > tegra-snd-sgtl5000 sound: ASoC: failed to init link sgtl5000 > tegra-snd-sgtl5000 sound: snd_soc_register_card failed (-22) > tegra-snd-sgtl5000: probe of sound failed with error -22 > > Signed-off-by: Marcel Ziswiler > > --- > > Changes in v2: New patch > > sound/soc/tegra/tegra_sgtl5000.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/sound/soc/tegra/tegra_sgtl5000.c b/sound/soc/tegra/tegra_sgtl5000.c > index 901457da25ec..eb702925cac3 100644 > --- a/sound/soc/tegra/tegra_sgtl5000.c > +++ b/sound/soc/tegra/tegra_sgtl5000.c > @@ -168,6 +168,11 @@ static int tegra_sgtl5000_driver_probe(struct platform_device *pdev) > return 0; > > err_fini_utils: > + if (tegra_sgtl5000_dai.platform) { > + devm_kfree(&pdev->dev, tegra_sgtl5000_dai.platform); > + tegra_sgtl5000_dai.platform = NULL; > + } > + > tegra_asoc_utils_fini(&machine->util_data); > err_put_cpu_of_node: > of_node_put(tegra_sgtl5000_dai.cpu_of_node); > Where is the above allocated? I don't see it allocated in this driver AFAICT. If it is not then it does not seem right to free something that we have not allocated in this driver. I would have assumed it was allocated by snd_soc_init_platform() in which case it should not be necessary to free because that function uses devm_kzalloc(). What am I missing here? Cheers Jon -- nvpublic