ASoC: max98095 codec: check return value
Ravindra Lokhande [Fri, 6 Apr 2012 12:55:30 +0000 (17:55 +0530)]
check max98095_reset() return value, this function fails if codec
read/write fails.

Change-Id: I4dddd75e0870e4168288396a462133f7287ad72e
Signed-off-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-on: http://git-master/r/95078
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Scott Peterson <speterson@nvidia.com>

sound/soc/codecs/max98095.c

index 3f873b6..38ffe6b 100644 (file)
@@ -2238,7 +2238,11 @@ static int max98095_probe(struct snd_soc_codec *codec)
        }
 
        /* reset the codec, the DSP core, and disable all interrupts */
-       max98095_reset(codec);
+       ret = max98095_reset(codec);
+       if (ret != 0) {
+               dev_err(codec->dev, "Failed to reset: %d\n", ret);
+               return ret;
+       }
 
        /* initialize private data */