summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2017-02-01 13:27:04 -0500
committerMark Brown <broonie@kernel.org>2017-02-01 13:35:06 -0500
commitcec55827dde1e87f6b91e34f205744d70a7225bc (patch)
tree8b8ea2dcc5c6fabfea56c932630e5bd4c72cb68b /sound
parentda369d0ab58cb21371f84a144084a16df7800783 (diff)
ASoC: rt5645: fix error handling for gpio detection
Optional gpio handling should not cause an error status and prevent probing if it's missing. Remove error return for -ENOENT case and move error message to dev_info Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/rt5645.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index 37fb2b6c34a5..e09fa19f44c0 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -3658,8 +3658,14 @@ static int rt5645_i2c_probe(struct i2c_client *i2c,
3658 GPIOD_IN); 3658 GPIOD_IN);
3659 3659
3660 if (IS_ERR(rt5645->gpiod_hp_det)) { 3660 if (IS_ERR(rt5645->gpiod_hp_det)) {
3661 dev_err(&i2c->dev, "failed to initialize gpiod\n"); 3661 dev_info(&i2c->dev, "failed to initialize gpiod\n");
3662 return PTR_ERR(rt5645->gpiod_hp_det); 3662 ret = PTR_ERR(rt5645->gpiod_hp_det);
3663 /*
3664 * Continue if optional gpiod is missing, bail for all other
3665 * errors, including -EPROBE_DEFER
3666 */
3667 if (ret != -ENOENT)
3668 return ret;
3663 } 3669 }
3664 3670
3665 for (i = 0; i < ARRAY_SIZE(rt5645->supplies); i++) 3671 for (i = 0; i < ARRAY_SIZE(rt5645->supplies); i++)