From patchwork Wed Aug 30 17:57:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 111332 Delivered-To: patch@linaro.org Received: by 10.140.95.112 with SMTP id h103csp1309326qge; Wed, 30 Aug 2017 10:58:08 -0700 (PDT) X-Google-Smtp-Source: ADKCNb5gkob38nwoAFcGq7qfgNxMYd1rbEY6M2O2wXV+N3X0tUxhiM778CVHIkAqg8znOKclbgjI X-Received: by 10.28.166.87 with SMTP id p84mr1781821wme.31.1504115887979; Wed, 30 Aug 2017 10:58:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504115887; cv=none; d=google.com; s=arc-20160816; b=jAjGzISa7EAy/ZoNCwjOaweRg9mpSBCHrC9VAEQGV6JkN25zVKwRAEowIoYkFnGJqg qssYiZdZ4JiAGWVa2n2fnkB8YHXZHYC6u0qqzUtb4eXW1KqGMzqTvy+y9tpn9sU13WdF GByPTfi9QnwxkI26EvUjnljrU0hwzjBzqOxWVDtC58q/f1lmUy+f782cxBrBk5UF3Cak Bk2RuZcrmA5R6AvBvFDUQBVc2fDega/hQJNIGRJfqCqS0qMWz8haxrDmIcDuFPDY2npv lZDNzH05xPic5RmQzGJHCpnApKesiuGJY/in9rsj2g24GST1ZtHkVlGAQIKVb5hI5x6l hI6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=Z7d/kIfzgQVqSKtMa8BjyAE/w1qehyHESRNzQN5sry0=; b=XmfDkTVp2ozeY7bC/o7hoovE+8M87iGRoxnPM5xpAILHlPUHW8OEboLBR53cAKyBQI b/CbejR9EVL7zW8kPwNk/2BlTDYuwWw8vWouWoEKEupzAaAtOdf1xn8g2HV2AZCpV5Et nxh0YL2XPBy15KwVb8LQ/rc6PjyU+7R6JME3n/eba2fA4ZV8rZwMUJVEStm/I17egKN9 K1tH9oTPkObk23ZPnA0DfU3loH5vKjncoJGiI1fSdrQGMuHy5mi4wuBlMWJrPv+zW0tR /0WCQKi/A63Dwc9c2As74b3LGLpZXw/xhIK8KWxApDLpf1crLEMFvJuUem3pjmTYwfoW EGxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=NV0s9iE/; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id w88si4900603wrb.504.2017.08.30.10.58.07; Wed, 30 Aug 2017 10:58:07 -0700 (PDT) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=NV0s9iE/; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 6FE582671D2; Wed, 30 Aug 2017 19:57:19 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 422C52671F2; Wed, 30 Aug 2017 19:57:18 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, RP_MATCHES_RCVD, SPF_PASS, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 8CECE2671BA for ; Wed, 30 Aug 2017 19:57:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=6Q5peuScV75dpT13l6YKF7H089xOD0YXsowYcazyCno=; b=NV0s9iE/bdJr PiuVfDqXc1NMc+2e39LcN4sKZX+9b1jvvBQuRVxZVXrnmu5EZCPIAGKESLp28pGRVdxJ8ikBMKAUd A8Ha+gAsFiGmLCctL5ODTyLyamy/M8OqsmVEcmdtdvA14gowtpjjgmZdagcfZV+mUuuA4dqUUzCpz B4B8A=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1dn7Ei-0007KX-Uy; Wed, 30 Aug 2017 17:57:08 +0000 Received: from broonie by debutante with local (Exim 4.89) (envelope-from ) id 1dn7Ei-0001BQ-Ds; Wed, 30 Aug 2017 18:57:08 +0100 From: Mark Brown To: Lucas Stach In-Reply-To: <20170829155122.28606-1-l.stach@pengutronix.de> Message-Id: Date: Wed, 30 Aug 2017 18:57:08 +0100 Cc: alsa-devel@alsa-project.org, Kuninori Morimoto , Takashi Iwai , Liam Girdwood , Mark Brown , kernel@pengutronix.de, patchwork-lst@pengutronix.de Subject: [alsa-devel] Applied "ASoC: simple_card_utils: fix fallback when "label" property isn't present" to the asoc tree X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org The patch ASoC: simple_card_utils: fix fallback when "label" property isn't present has been applied to the asoc tree at git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From 1b4a56cd7f5c2f835ffae2a8204fb95597269b10 Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Tue, 29 Aug 2017 17:51:22 +0200 Subject: [PATCH] ASoC: simple_card_utils: fix fallback when "label" property isn't present snd_soc_of_parse_card_name() doesn't return an error if the requested property isn't present, but silently fails to fill the card name. This can not be changed, as it is a backwards compatibility measure itself. We can not rely on the return value of this function alone, but must check if the card name has been filled sucessfully when deciding to skip the fallback path, which is in place for existing users. Fixes: dedfaa1eedc7 (ASoC: simple-card-utils: enable "label" on asoc_simple_card_parse_card_name) Signed-off-by: Lucas Stach Acked-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/generic/simple-card-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.14.1 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index 26d64fa40c9c..0442099157e6 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -132,7 +132,7 @@ int asoc_simple_card_parse_card_name(struct snd_soc_card *card, /* Parse the card name from DT */ ret = snd_soc_of_parse_card_name(card, "label"); - if (ret < 0) { + if (ret < 0 || !card->name) { char prop[128]; snprintf(prop, sizeof(prop), "%sname", prefix);