Skip to content

Commit

Permalink
ASoC: sgtl5000: Do not print error on probe deferral
Browse files Browse the repository at this point in the history
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: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Fabio Estevam authored and Mark Brown committed Jan 18, 2018
1 parent 4fbd8d1 commit 8af5748
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sound/soc/codecs/sgtl5000.c
Original file line number Diff line number Diff line change
Expand Up @@ -1332,10 +1332,13 @@ static int sgtl5000_i2c_probe(struct i2c_client *client,
sgtl5000->mclk = devm_clk_get(&client->dev, NULL);
if (IS_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 */
if (ret == -ENOENT)
ret = -EPROBE_DEFER;

if (ret != -EPROBE_DEFER)
dev_err(&client->dev, "Failed to get mclock: %d\n",
ret);
goto disable_regs;
}

Expand Down

0 comments on commit 8af5748

Please sign in to comment.