LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] at73c213: Fix error checking for clk API.
@ 2008-03-07  9:45 Atsushi Nemoto
  0 siblings, 0 replies; only message in thread
From: Atsushi Nemoto @ 2008-03-07  9:45 UTC (permalink / raw)
  To: linux-kernel; +Cc: Hans-Christian Egtvedt, Haavard Skinnemoen, Andrew Victor

The clk_round_rate() and clk_set_rate() will return int, so not store
thier return value to unsigned long variable.  This bug hides real
error on these API.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
diff --git a/sound/spi/at73c213.c b/sound/spi/at73c213.c
index 89d6e9c..d130552 100644
--- a/sound/spi/at73c213.c
+++ b/sound/spi/at73c213.c
@@ -133,7 +133,8 @@ static struct snd_pcm_hardware snd_at73c213_playback_hw = {
 static int snd_at73c213_set_bitrate(struct snd_at73c213 *chip)
 {
 	unsigned long ssc_rate = clk_get_rate(chip->ssc->clk);
-	unsigned long dac_rate_new, ssc_div, status;
+	unsigned long dac_rate_new, ssc_div;
+	int status;
 	unsigned long ssc_div_max, ssc_div_min;
 	int max_tries;
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-03-07  9:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-07  9:45 [PATCH] at73c213: Fix error checking for clk API Atsushi Nemoto

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