linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: kirkwood: fix a not initialized variable in the sound subsystem
@ 2013-03-26 18:05 Jean-Francois Moine
  2013-03-26 19:41 ` Sebastian Hesselbarth
  0 siblings, 1 reply; 7+ messages in thread
From: Jean-Francois Moine @ 2013-03-26 18:05 UTC (permalink / raw)
  To: linux-arm-kernel

In the function kirkwood_set_rate, in case of a non dco supported rate
and no external clock, the clock source was set to an undefined value.
This patch just displays a message without changing the clock source.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
---
 sound/soc/kirkwood/kirkwood-i2s.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c
index c74c890..afca1ec 100644
--- a/sound/soc/kirkwood/kirkwood-i2s.c
+++ b/sound/soc/kirkwood/kirkwood-i2s.c
@@ -118,6 +118,9 @@ static void kirkwood_set_rate(struct snd_soc_dai *dai,
 		clk_set_rate(priv->extclk, 256 * rate);
 
 		clks_ctrl = KIRKWOOD_MCLK_SOURCE_EXTCLK;
+	} else {
+		dev_err(dai->dev, "%s: no clock\n", __func__);
+		return;
 	}
 	writel(clks_ctrl, priv->io + KIRKWOOD_CLOCKS_CTRL);
 }
-- 
1.7.10.4

-- 
Ken ar c'henta?	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-03-27 23:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-26 18:05 [PATCH 1/2] ARM: kirkwood: fix a not initialized variable in the sound subsystem Jean-Francois Moine
2013-03-26 19:41 ` Sebastian Hesselbarth
2013-03-26 20:05   ` Jean-Francois Moine
2013-03-26 20:14     ` Sebastian Hesselbarth
2013-03-26 20:39     ` Sebastian Hesselbarth
2013-03-27  7:31       ` Jean-Francois Moine
2013-03-27 23:07         ` Russell King - ARM Linux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).