diff options
author | Ravindra Lokhande <rlokhande@nvidia.com> | 2012-04-06 18:25:30 +0530 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2012-04-08 23:08:11 -0700 |
commit | cf219d049437e8e4650200c4fa3a54948ce1025c (patch) | |
tree | 2ce4badcaa9b461e710e36f87618f5d131e17c41 /sound/soc | |
parent | 029ca427a1ecc601708584fc0bdde9a2c86162b9 (diff) |
ASoC: max98095 codec: check return value
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>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/max98095.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c index 3f873b6d75a3..38ffe6b96b5b 100644 --- a/sound/soc/codecs/max98095.c +++ b/sound/soc/codecs/max98095.c @@ -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 */ |