Commit 8af5748f authored by Fabio Estevam's avatar Fabio Estevam Committed by Mark Brown

ASoC: sgtl5000: Do not print error on probe deferral

When the MCLK is not yet available when the codec is probed, probe
deferral will happen and in this case we should not print an
error message.
Signed-off-by: default avatarFabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 4fbd8d19
...@@ -1332,10 +1332,13 @@ static int sgtl5000_i2c_probe(struct i2c_client *client, ...@@ -1332,10 +1332,13 @@ static int sgtl5000_i2c_probe(struct i2c_client *client,
sgtl5000->mclk = devm_clk_get(&client->dev, NULL); sgtl5000->mclk = devm_clk_get(&client->dev, NULL);
if (IS_ERR(sgtl5000->mclk)) { if (IS_ERR(sgtl5000->mclk)) {
ret = PTR_ERR(sgtl5000->mclk); ret = PTR_ERR(sgtl5000->mclk);
dev_err(&client->dev, "Failed to get mclock: %d\n", ret);
/* Defer the probe to see if the clk will be provided later */ /* Defer the probe to see if the clk will be provided later */
if (ret == -ENOENT) if (ret == -ENOENT)
ret = -EPROBE_DEFER; ret = -EPROBE_DEFER;
if (ret != -EPROBE_DEFER)
dev_err(&client->dev, "Failed to get mclock: %d\n",
ret);
goto disable_regs; goto disable_regs;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment