ASoC: sunxi: Use dev_err_probe() helper
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 14 Dec 2021 02:08:43 +0000 (11:08 +0900)
committerMark Brown <broonie@kernel.org>
Mon, 20 Dec 2021 12:47:24 +0000 (12:47 +0000)
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-23-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sunxi/sun4i-codec.c

index da597e456beb253027fa88c34b8f350af01aa438..60712f24ade59ee715a08d37fb100cfb2474bda2 100644 (file)
@@ -1752,8 +1752,7 @@ static int sun4i_codec_probe(struct platform_device *pdev)
                                                  GPIOD_OUT_LOW);
        if (IS_ERR(scodec->gpio_pa)) {
                ret = PTR_ERR(scodec->gpio_pa);
-               if (ret != -EPROBE_DEFER)
-                       dev_err(&pdev->dev, "Failed to get pa gpio: %d\n", ret);
+               dev_err_probe(&pdev->dev, ret, "Failed to get pa gpio\n");
                return ret;
        }