summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2021-12-14 05:08:27 +0300
committerMark Brown <broonie@kernel.org>2021-12-20 15:47:07 +0300
commitec1e0e72a8d4180c65aee01e9563ddfb47f87709 (patch)
treee995630186e16c7808b4d3d889eb3fbaff15db93
parent526f6ca95a9d0c85ccb0a83ed48936394e4185e6 (diff)
downloadlinux-ec1e0e72a8d4180c65aee01e9563ddfb47f87709.tar.xz
ASoC: codecs: sgtl5000: Use dev_err_probe() helper
Use the dev_err_probe() helper, instead of open-coding the same operation. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/20211214020843.2225831-7-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/sgtl5000.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index 97bf1f222805..8eebf27d0ea2 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -1612,9 +1612,8 @@ static int sgtl5000_i2c_probe(struct i2c_client *client,
if (ret == -ENOENT)
ret = -EPROBE_DEFER;
- if (ret != -EPROBE_DEFER)
- dev_err(&client->dev, "Failed to get mclock: %d\n",
- ret);
+ dev_err_probe(&client->dev, ret, "Failed to get mclock\n");
+
goto disable_regs;
}