ASoC: codec: wm8960: Stop when a matching PLL freq is found
authorDaniel Baluta <daniel.baluta@nxp.com>
Thu, 6 Apr 2017 11:51:53 +0000 (14:51 +0300)
committerMark Brown <broonie@kernel.org>
Thu, 6 Apr 2017 18:26:41 +0000 (19:26 +0100)
When a matching PLL freq is found, searching continues even this is
not necessary. The problem was introduced with the following refactoring
commit 84fdc00d519ffd ("ASoC: codec: wm9860: Refactor PLL out freq search)

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wm8960.c

index 36c84549da238668c3a8fa3ed46b245e57980435..ace69da97cb80942868efe91b44f3ef29ca55e9c 100644 (file)
@@ -724,7 +724,11 @@ int wm8960_configure_pll(struct snd_soc_codec *codec, int freq_in,
                                        break;
                                }
                        }
+                       if (k != ARRAY_SIZE(bclk_divs))
+                               break;
                }
+               if (j != ARRAY_SIZE(dac_divs))
+                       break;
        }
 
        if (*bclk_idx != -1)