aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm9081.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/wm9081.c')
-rw-r--r--sound/soc/codecs/wm9081.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c
index dc383c29cce5..1f51dd542a46 100644
--- a/sound/soc/codecs/wm9081.c
+++ b/sound/soc/codecs/wm9081.c
@@ -642,6 +642,10 @@ static int configure_clock(struct snd_soc_codec *codec)
642 target > 3000000) 642 target > 3000000)
643 break; 643 break;
644 } 644 }
645
646 if (i == ARRAY_SIZE(clk_sys_rates))
647 return -EINVAL;
648
645 } else if (wm9081->fs) { 649 } else if (wm9081->fs) {
646 for (i = 0; i < ARRAY_SIZE(clk_sys_rates); i++) { 650 for (i = 0; i < ARRAY_SIZE(clk_sys_rates); i++) {
647 new_sysclk = clk_sys_rates[i].ratio 651 new_sysclk = clk_sys_rates[i].ratio
@@ -649,6 +653,10 @@ static int configure_clock(struct snd_soc_codec *codec)
649 if (new_sysclk > 3000000) 653 if (new_sysclk > 3000000)
650 break; 654 break;
651 } 655 }
656
657 if (i == ARRAY_SIZE(clk_sys_rates))
658 return -EINVAL;
659
652 } else { 660 } else {
653 new_sysclk = 12288000; 661 new_sysclk = 12288000;
654 } 662 }