From patchwork Tue Jan 23 17:28:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 125565 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1891938ljf; Tue, 23 Jan 2018 09:28:38 -0800 (PST) X-Google-Smtp-Source: AH8x224/W5Xr60+Y7ox8qiE5ESOwQgs7N4I0Wrn+zhhAW8FOJl8ozrJgNJUKLaNtKdboDjXAyzXz X-Received: by 10.28.247.11 with SMTP id v11mr2761497wmh.27.1516728518617; Tue, 23 Jan 2018 09:28:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516728518; cv=none; d=google.com; s=arc-20160816; b=ZZlHwLwc0InuTiP+M6FLcnmSJSWrf7EnmbTL0oVmfCr4E6H9/X4GewL9XoQcmJH9Om 00hCjLuCWOuHHvUIShBb+tQLiNN1yuwWkXIIqcneA+xgnUrA308XEyU4Z+KRr9oMflXK ayqLJbS3HIhdsag3iTUFgpHNpy3wh3/Qisw7NyOC3rQFbP6XVMMhNwuhK4mEX3OWIvHt fYk56QR8xBaF0DST8LUv6t9FQeOlNCywoMrjCt1I514LQqQv6tHx56HOvsH6DstroFtf dGri43E55VUE3R0yHyCv7R0fHUebTK6e4yF9f3LfAXEiHha9avewxGx+ZnhzV6FZ9qnn 5D1w== 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=XIgXWdVSiCXqL79+fIsjZGn57UDtod4KCsdSzL7YEoM=; b=y8fVyM7OAu6bPwixl9XvyLmr4I5ehdMtQFLEYiBqXmdPGa+8pNqa9fe9VDpO4EDr+0 6YmRynxlOx6njMbnz7BvLh+fyCOIILyuOREKoDNTE72rzLQ7GNb7W6MPkq/R/GM5PnsU xfbxtEsrpcrvemogF2G2jxF8E/IFQF592PeBuPZe2v4cyliCbAM/kXy7uC9cA6FRNbKZ vj9tQtrMBkH/vsZ7gOVLuruymX5iDWWz41XU6EWwOss45syxkjI6BmeQKSuqXkXxMMRc EdccL7wIqhzM067Auqy05MpJaTTjCx8wvt6o7FXWep1A+3vXuQ5v3gSA1HtZ+dY1mqZa R1cg== 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=X87c3UhP; 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 t101si591829wrc.339.2018.01.23.09.28.38; Tue, 23 Jan 2018 09:28:38 -0800 (PST) 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=X87c3UhP; 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 E4B4A2673D1; Tue, 23 Jan 2018 18:28:36 +0100 (CET) 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 473112673D3; Tue, 23 Jan 2018 18:28:36 +0100 (CET) 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, SPF_PASS, T_RP_MATCHES_RCVD 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 4624E2672B0 for ; Tue, 23 Jan 2018 18:28:32 +0100 (CET) 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=DoXylsSzr340p+G6EWsFExJ7ahGe2KiuWgE//g+nGKQ=; b=X87c3UhP3NN6 yJ+Y16oqtCwUOiFOs7cWCEithS4+of8t1MNF0eaUWWS9aBNMbP0xjidpRWH/2TuUFPpwQEy2fA+4/ UDVSjePcAU8W0Q/n0urTz5/FbyvoDAHnV5/MFlQP/1QVeeXjmjuP2GNPGvtWq/L+F9RXqBXv9Pt2m iiQ+4=; 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 1ee2N2-0002eU-2B; Tue, 23 Jan 2018 17:28:28 +0000 Received: from broonie by debutante with local (Exim 4.90) (envelope-from ) id 1ee2N1-00035L-5E; Tue, 23 Jan 2018 17:28:27 +0000 From: Mark Brown To: Kuninori Morimoto In-Reply-To: <87o9llo1b1.wl%kuninori.morimoto.gx@renesas.com> Message-Id: Date: Tue, 23 Jan 2018 17:28:27 +0000 Cc: Manuel Lauss , alsa-devel@alsa-project.org, Mark Brown , MukundaVijendar Subject: [alsa-devel] Applied "ASoC: soc-core: snd_soc_rtdcom_lookup() cares component driver name" 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: soc-core: snd_soc_rtdcom_lookup() cares component driver name has been applied to the asoc tree at https://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 971da24c48a9447fb7a3c7805812fd5f443ca008 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 23 Jan 2018 00:41:24 +0000 Subject: [PATCH] ASoC: soc-core: snd_soc_rtdcom_lookup() cares component driver name snd_soc_rtdcom_lookup() look up component by uisng driver name. Then, it uses component->driver->name. Some driver might doesn't have it, thus it should care NULL pointer. This patch solve this issue. Reported-by: Mukunda,Vijendar Reported-by: Manuel Lauss Signed-off-by: Kuninori Morimoto Tested-by: Mukunda,Vijendar Signed-off-by: Mark Brown --- sound/soc/soc-core.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) -- 2.15.1 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 9b79c2199781..52b2e04cc5e2 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -590,9 +590,17 @@ struct snd_soc_component *snd_soc_rtdcom_lookup(struct snd_soc_pcm_runtime *rtd, { struct snd_soc_rtdcom_list *rtdcom; + if (!driver_name) + return NULL; + for_each_rtdcom(rtd, rtdcom) { - if ((rtdcom->component->driver->name == driver_name) || - strcmp(rtdcom->component->driver->name, driver_name) == 0) + const char *component_name = rtdcom->component->driver->name; + + if (!component_name) + continue; + + if ((component_name == driver_name) || + strcmp(component_name, driver_name) == 0) return rtdcom->component; }