[ALSA] at73c213: fix error checking for clk API
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Sat, 8 Mar 2008 10:07:26 +0000 (11:07 +0100)
committerTakashi Iwai <tiwai@suse.de>
Thu, 24 Apr 2008 10:00:22 +0000 (12:00 +0200)
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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/spi/at73c213.c

index b8860b26fc62cc735dd3b72cf80f4c9f98b9d8b9..c1b0b9dff819e6b3bd01484564e895e5437bb806 100644 (file)
@@ -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;