From: Kuninori Morimoto Date: Tue, 14 Dec 2021 02:08:43 +0000 (+0900) Subject: ASoC: sunxi: Use dev_err_probe() helper X-Git-Tag: v5.17-rc1~86^2~15^2~36^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=11a95c583c1de215d2c338bf5cb9f929312616f8;p=thirdparty%2Fkernel%2Flinux.git ASoC: sunxi: Use dev_err_probe() helper Use the dev_err_probe() helper, instead of open-coding the same operation. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/20211214020843.2225831-23-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c index da597e456beb2..60712f24ade59 100644 --- a/sound/soc/sunxi/sun4i-codec.c +++ b/sound/soc/sunxi/sun4i-codec.c @@ -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; }