]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/soc/codecs/wm8731.c
ASoC: Check for errors when writing WM8731 reset register
[linux-2.6-omap-h63xx.git] / sound / soc / codecs / wm8731.c
index 4191bdb803bf53cc81d176427fd2a44a52c2fc90..9c9fc3b5a6c808d19a60e1b1362f74b8dd2d8551 100644 (file)
@@ -574,9 +574,14 @@ static int wm8731_register(struct wm8731_priv *wm8731)
 
        memcpy(codec->reg_cache, wm8731_reg, sizeof(wm8731_reg));
 
+       ret = wm8731_reset(codec);
+       if (ret < 0) {
+               dev_err(codec->dev, "Failed to issue reset\n");
+               return ret;
+       }
+
        wm8731_dai.dev = codec->dev;
 
-       wm8731_reset(codec);
        wm8731_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
 
        /* Latch the update bits */