提交 cec55827 编写于 作者: P Pierre-Louis Bossart 提交者: Mark Brown

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: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 da369d0a
...@@ -3658,8 +3658,14 @@ static int rt5645_i2c_probe(struct i2c_client *i2c, ...@@ -3658,8 +3658,14 @@ static int rt5645_i2c_probe(struct i2c_client *i2c,
GPIOD_IN); GPIOD_IN);
if (IS_ERR(rt5645->gpiod_hp_det)) { if (IS_ERR(rt5645->gpiod_hp_det)) {
dev_err(&i2c->dev, "failed to initialize gpiod\n"); dev_info(&i2c->dev, "failed to initialize gpiod\n");
return PTR_ERR(rt5645->gpiod_hp_det); ret = PTR_ERR(rt5645->gpiod_hp_det);
/*
* Continue if optional gpiod is missing, bail for all other
* errors, including -EPROBE_DEFER
*/
if (ret != -ENOENT)
return ret;
} }
for (i = 0; i < ARRAY_SIZE(rt5645->supplies); i++) for (i = 0; i < ARRAY_SIZE(rt5645->supplies); i++)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册