From: Charles Keepax Date: Wed, 9 Jul 2014 16:41:43 +0000 (+0100) Subject: ASoC: arizona: Do not test ratio zero as it is not a valid setting X-Git-Tag: firefly_0821_release~176^2~3158^2~37^2~11^5~7 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4714bc015de147c2da5248762b2772c6dbf160eb;p=firefly-linux-kernel-4.4.55.git ASoC: arizona: Do not test ratio zero as it is not a valid setting Zero is not a valid FRATIO for the FLL, as such we shouldn't test it whilst refining the FRATIO. This patch does just that. Reported-by: Ryo Tsutsui Signed-off-by: Charles Keepax Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c index 41b56ee6ff51..b03974eb541e 100644 --- a/sound/soc/codecs/arizona.c +++ b/sound/soc/codecs/arizona.c @@ -1585,7 +1585,7 @@ static int arizona_calc_fratio(struct arizona_fll *fll, } } - for (ratio = init_ratio - 1; ratio >= 0; ratio--) { + for (ratio = init_ratio - 1; ratio > 0; ratio--) { if (ARIZONA_FLL_VCO_CORNER / (fll->vco_mult * ratio) < Fref) break;