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: <1614276364-13655-2-git-send-email-spujar@nvidia.com>
Date:   Thu, 25 Feb 2021 23:36:00 +0530
From:   Sameer Pujar <spujar@...dia.com>
To:     <broonie@...nel.org>, <robh@...nel.org>
CC:     <jonathanh@...dia.com>, <kuninori.morimoto.gx@...esas.com>,
        <alsa-devel@...a-project.org>, <devicetree@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, Sameer Pujar <spujar@...dia.com>
Subject: [RFC PATCH 1/5] ASoC: soc-component: Fix return value of snd_soc_component_set_pll()

snd_soc_component_set_pll() returns "-EINVAL" and prints following
error if a component does not implement set_pll() callback exposed
by the component driver. This happens when snd_soc_dai_set_sysclk()
is invoked, which in turn calls snd_soc_component_set_pll().

  "ASoC: error at snd_soc_dai_set_pll on xxx: -22"

Above is not necessary because a component may not need additional
configuration and chooses to not implement this.

Fix this by changing default return value to "-ENOTSUPP" and driver
code which invokes snd_soc_component_set_pll() can ignore this error.

Signed-off-by: Sameer Pujar <spujar@...dia.com>
---
 sound/soc/soc-component.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index 159bf88..fd04e75 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -109,7 +109,7 @@ int snd_soc_component_set_pll(struct snd_soc_component *component, int pll_id,
 			      int source, unsigned int freq_in,
 			      unsigned int freq_out)
 {
-	int ret = -EINVAL;
+	int ret = -ENOTSUPP;
 
 	if (component->driver->set_pll)
 		ret = component->driver->set_pll(component, pll_id, source,
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ