lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1545642133-16120-3-git-send-email-rohitkr@codeaurora.org>
Date:   Mon, 24 Dec 2018 14:32:13 +0530
From:   Rohit kumar <rohitkr@...eaurora.org>
To:     plai@...eaurora.org, bgoswami@...eaurora.org,
        asishb@...eaurora.org, lgirdwood@...il.com, broonie@...nel.org,
        perex@...ex.cz, tiwai@...e.com, alsa-devel@...a-project.org,
        linux-kernel@...r.kernel.org, rohkumar@....qualcomm.com,
        srinivas.kandagatla@...aro.org
Cc:     Ajit Pandey <ajitp@...eaurora.org>,
        Rohit kumar <rohitkr@...eaurora.org>
Subject: [PATCH 2/2] ASoC: qcom: defer probe if platform dai is not registered

From: Ajit Pandey <ajitp@...eaurora.org>

Platform DAI component probe is not called if it is not
present in component list during sound card registration.
Check if component is registered for platform dai before
soundcard registration.

Signed-off-by: Ajit Pandey <ajitp@...eaurora.org>
Signed-off-by: Rohit kumar <rohitkr@...eaurora.org>
---
 sound/soc/qcom/common.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/sound/soc/qcom/common.c b/sound/soc/qcom/common.c
index 4715527..9e98458 100644
--- a/sound/soc/qcom/common.c
+++ b/sound/soc/qcom/common.c
@@ -11,6 +11,7 @@ int qcom_snd_parse_of(struct snd_soc_card *card)
 	struct device_node *codec = NULL;
 	struct device_node *platform = NULL;
 	struct device_node *cpu = NULL;
+	struct snd_soc_component *component = NULL;
 	struct device *dev = card->dev;
 	struct snd_soc_dai_link *link;
 	struct of_phandle_args args;
@@ -75,6 +76,14 @@ int qcom_snd_parse_of(struct snd_soc_card *card)
 				goto err;
 			}
 
+			component = snd_soc_of_lookup_component
+						(link->platform_of_node);
+			if (!component) {
+				ret = -EPROBE_DEFER;
+				dev_err(card->dev, "platform DAI not registered\n");
+				goto err;
+			}
+
 			ret = snd_soc_of_get_dai_link_codecs(dev, codec, link);
 			if (ret < 0) {
 				dev_err(card->dev, "codec dai not found\n");
-- 
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc.,
is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ