aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/codecs/wm8996.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c
index dc92d5e4e942..7a2b96959589 100644
--- a/sound/soc/codecs/wm8996.c
+++ b/sound/soc/codecs/wm8996.c
@@ -2009,7 +2009,7 @@ static int wm8996_set_fll(struct snd_soc_codec *codec, int fll_id, int source,
2009 struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec); 2009 struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec);
2010 struct i2c_client *i2c = to_i2c_client(codec->dev); 2010 struct i2c_client *i2c = to_i2c_client(codec->dev);
2011 struct _fll_div fll_div; 2011 struct _fll_div fll_div;
2012 unsigned long timeout; 2012 unsigned long timeout, time_left;
2013 int ret, reg, retry; 2013 int ret, reg, retry;
2014 2014
2015 /* Any change? */ 2015 /* Any change? */
@@ -2113,10 +2113,11 @@ static int wm8996_set_fll(struct snd_soc_codec *codec, int fll_id, int source,
2113 timeout /= 2; 2113 timeout /= 2;
2114 2114
2115 for (retry = 0; retry < 10; retry++) { 2115 for (retry = 0; retry < 10; retry++) {
2116 ret = wait_for_completion_timeout(&wm8996->fll_lock, 2116 time_left = wait_for_completion_timeout(&wm8996->fll_lock,
2117 timeout); 2117 timeout);
2118 if (ret != 0) { 2118 if (time_left != 0) {
2119 WARN_ON(!i2c->irq); 2119 WARN_ON(!i2c->irq);
2120 ret = 1;
2120 break; 2121 break;
2121 } 2122 }
2122 2123