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: <d288d87fc0f1c07f4d301dc08d32b1bf9915446c.1463996627.git.joabreu@synopsys.com>
Date:	Mon, 23 May 2016 11:02:23 +0100
From:	Jose Abreu <Jose.Abreu@...opsys.com>
To:	alsa-devel@...a-project.org
Cc:	Jose Abreu <Jose.Abreu@...opsys.com>,
	Carlos Palminha <CARLOS.PALMINHA@...opsys.com>,
	Mark Brown <broonie@...nel.org>,
	Liam Girdwood <lgirdwood@...il.com>,
	Jaroslav Kysela <perex@...ex.cz>,
	Takashi Iwai <tiwai@...e.com>, Rob Herring <robh@...nel.org>,
	Alexey Brodkin <Alexey.Brodkin@...opsys.com>,
	linux-snps-arc@...ts.infradead.org, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH 2/4 v7] ASoC: dwc: Do not use devm_clk_get() if using platform data

When using platform data the devm_clk_get() function is
called causing a probe failure if the clock is not
declared. As we can pass the clock handler by platform
data call only devm_clk_get() when platform data is not
used.

Signed-off-by: Jose Abreu <joabreu@...opsys.com>
Cc: Carlos Palminha <palminha@...opsys.com>
Cc: Mark Brown <broonie@...nel.org>
Cc: Liam Girdwood <lgirdwood@...il.com>
Cc: Jaroslav Kysela <perex@...ex.cz>
Cc: Takashi Iwai <tiwai@...e.com>
Cc: Rob Herring <robh@...nel.org>
Cc: Alexey Brodkin <abrodkin@...opsys.com>
Cc: linux-snps-arc@...ts.infradead.org
Cc: alsa-devel@...a-project.org
Cc: devicetree@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
---

This patch was only introduced in v7.

 sound/soc/dwc/designware_i2s.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/sound/soc/dwc/designware_i2s.c b/sound/soc/dwc/designware_i2s.c
index 4c4f0dc..a97be8e 100644
--- a/sound/soc/dwc/designware_i2s.c
+++ b/sound/soc/dwc/designware_i2s.c
@@ -690,15 +690,16 @@ static int dw_i2s_probe(struct platform_device *pdev)
 				dev_err(&pdev->dev, "no clock configure method\n");
 				return -ENODEV;
 			}
-		}
-		dev->clk = devm_clk_get(&pdev->dev, clk_id);
+		} else {
+			dev->clk = devm_clk_get(&pdev->dev, clk_id);
 
-		if (IS_ERR(dev->clk))
-			return PTR_ERR(dev->clk);
+			if (IS_ERR(dev->clk))
+				return PTR_ERR(dev->clk);
 
-		ret = clk_prepare_enable(dev->clk);
-		if (ret < 0)
-			return ret;
+			ret = clk_prepare_enable(dev->clk);
+			if (ret < 0)
+				return ret;
+		}
 	}
 
 	dev_set_drvdata(&pdev->dev, dev);
-- 
1.9.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ