From patchwork Tue Oct 16 10:47:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Ziswiler X-Patchwork-Id: 984679 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-tegra-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ziswiler.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42ZBrK5nQ1z9s9h for ; Tue, 16 Oct 2018 21:49:05 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727461AbeJPSis (ORCPT ); Tue, 16 Oct 2018 14:38:48 -0400 Received: from mout.perfora.net ([74.208.4.197]:60191 "EHLO mout.perfora.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727075AbeJPSir (ORCPT ); Tue, 16 Oct 2018 14:38:47 -0400 Received: from localhost.localdomain.toradex.int ([46.140.72.82]) by mrelay.perfora.net (mreueus002 [74.208.5.2]) with ESMTPA (Nemesis) id 0LzIe7-1fYL5j3C3V-014Pxx; Tue, 16 Oct 2018 12:48:07 +0200 Received: from localhost.localdomain.toradex.int ([46.140.72.82]) by mrelay.perfora.net (mreueus002 [74.208.5.2]) with ESMTPA (Nemesis) id 0LzIe7-1fYL5j3C3V-014Pxx; Tue, 16 Oct 2018 12:48:07 +0200 From: Marcel Ziswiler To: devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Russell King - ARM Linux , Mark Brown , Kuninori Morimoto , Marcel Ziswiler , Jaroslav Kysela , alsa-devel@alsa-project.org, Thierry Reding , Jonathan Hunter , Takashi Iwai , Liam Girdwood Subject: [PATCH v2 9/9] ASoC: tegra_sgtl5000: fix platform name vs. of_node assignement Date: Tue, 16 Oct 2018 12:47:30 +0200 Message-Id: <20181016104730.4598-10-marcel@ziswiler.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20181016104730.4598-1-marcel@ziswiler.com> References: <20181016104730.4598-1-marcel@ziswiler.com> X-Provags-ID: V03:K1:MIunh8M8gL/uGufQy84VMDRM78SzrUFY0quxDQdowA0Wsci8h+a 38ubtDDQBcvaJz9+ceurnZK6HKW9+1Xlv19w6emZe1YA5SU3lW01AKbyETAnabzStDOX0Dh a5tV+xrPwQi7Uk/kNDzJDJq2PJro4mjdXM8GmdR6RZ4tpjKYSE0+/N+zQ6vE8tnxfA3ia4C Zt9JlDlWQiofVpm5pmW1A== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V01:K0:C3uMcV8zHwI=:3lyw1gJjsmSoDHl2tc44Ea nKE3+a8aWKIOFCOYqfNa3a950WF/j9nEi2NE0gjtd0tZuWwaYJ9drKZ1w/4pJ0yiD1U0WBMEW 83ZKjeD1UpNeAPRagy6rfwzdndoy+9HoyNuTH5tu9GZidP68uxEl4boql4DTN8c8wK+kwDOME GHpMT/ipAn5fq19FwDYHNypxdTIijYRdQ/UwnwQcHhG8cJOjlHwq8dbaYutGtJu6Yqm726Pcz U0gX/6qFIDWwc1FqYFkESge6oZpf/mUgWpXqgP0/0U9mrMpLdspSQ3hEG7uBmhucpC5SQXtft Mi/ADhNi8OqVu88Vui1/ru2ik4Z8nmolA+SQQA+e9bEZB+WT/ehE+VCm50Ov52YryvjeG7f0K 9fKFb0DP1KQhZlJp2BV4SQCFMKxoCAnHbx9BOhqRV+t/YECYYVIlTNcGnGG369NetdOs2VpKi Vr0oTxYeRodJ42dEo4m0i7abQVzuzn2Wf11L2a/vwSRV5oUoGLFGXByO1A2gNZydTPF26NH3P E/y6541JZrz0+vaOdApWUWhLOxnP9fmS2+Ub4Gdr7x9kyh+IWiWqBE3RQcG9VTMwlM5ZPFQGX 2KQTdTkfN+Z+X74vi/FvvlYzqQZ9Ca118B5Kb69sPMv8h/eMXyACgld8l6COUzY/fYECChcd5 9hnVG9Kfh1707a9JsCH1UwHq7i8zEhpC1JRPlLmHd803Q/YQMYwqQF37KoIAqPmS74mU= Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org 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);