diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2021-12-14 05:08:36 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-12-20 15:47:16 +0300 |
commit | ef12f373f21d66e9d14eeace517c05fc2c9cf258 (patch) | |
tree | b95184e8d584f8067685f640f658344c4eb0a859 /sound/soc/img/img-spdif-in.c | |
parent | 7a0299e13bc740caebbbba24b3df85fc9ffa7759 (diff) | |
download | linux-ef12f373f21d66e9d14eeace517c05fc2c9cf258.tar.xz |
ASoC: img: 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-16-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/img/img-spdif-in.c')
-rw-r--r-- | sound/soc/img/img-spdif-in.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sound/soc/img/img-spdif-in.c b/sound/soc/img/img-spdif-in.c index 6364eb742f6d..95914d0612fe 100644 --- a/sound/soc/img/img-spdif-in.c +++ b/sound/soc/img/img-spdif-in.c @@ -739,11 +739,9 @@ static int img_spdif_in_probe(struct platform_device *pdev) spdif->base = base; spdif->clk_sys = devm_clk_get(dev, "sys"); - if (IS_ERR(spdif->clk_sys)) { - if (PTR_ERR(spdif->clk_sys) != -EPROBE_DEFER) - dev_err(dev, "Failed to acquire clock 'sys'\n"); - return PTR_ERR(spdif->clk_sys); - } + if (IS_ERR(spdif->clk_sys)) + return dev_err_probe(dev, PTR_ERR(spdif->clk_sys), + "Failed to acquire clock 'sys'\n"); pm_runtime_enable(&pdev->dev); if (!pm_runtime_enabled(&pdev->dev)) { |