linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: mach-shmobile: fix Oops during system wake up
@ 2011-04-15 18:10 Guennadi Liakhovetski
  2011-04-15 18:37 ` Guennadi Liakhovetski
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Guennadi Liakhovetski @ 2011-04-15 18:10 UTC (permalink / raw)
  To: linux-sh

During system resume the clock subsystem is restoring all clock rates,
if sound has not been used before suspend, the rate remains 0 and
the wake up Oopses with division by zero.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Simon Horman <horms@verge.net.au>
Cc: Magnus Damm <damm@opensource.se>
---
 arch/arm/mach-shmobile/clock-sh7372.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c
index e9731b5..fb29d89 100644
--- a/arch/arm/mach-shmobile/clock-sh7372.c
+++ b/arch/arm/mach-shmobile/clock-sh7372.c
@@ -458,6 +458,9 @@ static int fsidiv_set_rate(struct clk *clk, unsigned long rate)
 {
 	int idx;
 
+	if (!rate)
+		return -EDOM;
+
 	idx = (clk->parent->rate / rate) & 0xffff;
 	if (idx < 2)
 		return -EINVAL;
-- 
1.7.2.5


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

end of thread, other threads:[~2011-04-18  9:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-15 18:10 [PATCH] ARM: mach-shmobile: fix Oops during system wake up Guennadi Liakhovetski
2011-04-15 18:37 ` Guennadi Liakhovetski
2011-04-16 10:38 ` Simon Horman
2011-04-18  9:09 ` Paul Mundt
2011-04-18  9:13 ` Magnus Damm

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).