diff mbox

[1/7] ASoC: arizona: Do not test ratio zero as it is not a valid setting

Message ID 1404924109-1750-2-git-send-email-ckeepax@opensource.wolfsonmicro.com (mailing list archive)
State Accepted
Commit 4714bc015de147c2da5248762b2772c6dbf160eb
Headers show

Commit Message

Charles Keepax July 9, 2014, 4:41 p.m. UTC
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 <ryo.tsutsui@wolfsonmicro.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 sound/soc/codecs/arizona.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index c5b6be2..a0252a7 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -1630,7 +1630,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;