[PATCH] ASoC: wm8524: Do not print probe defer error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On an imx8mq-evk the following error is seen:

[    1.375809] wm8524-codec audio-codec: Failed to get mute line: -517

It happens because the codec driver may probe prior to the imx gpio
driver, which causes a probe defer.

Change to dev_err_probe() to avoid printing this error.

Reported-by: Chris Healy <cphealy@xxxxxxxxx>
Signed-off-by: Fabio Estevam <festevam@xxxxxxxxx>
---
 sound/soc/codecs/wm8524.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/wm8524.c b/sound/soc/codecs/wm8524.c
index 4e9ab542f648..81f858f6bd67 100644
--- a/sound/soc/codecs/wm8524.c
+++ b/sound/soc/codecs/wm8524.c
@@ -227,7 +227,7 @@ static int wm8524_codec_probe(struct platform_device *pdev)
 	wm8524->mute = devm_gpiod_get(&pdev->dev, "wlf,mute", GPIOD_OUT_LOW);
 	if (IS_ERR(wm8524->mute)) {
 		ret = PTR_ERR(wm8524->mute);
-		dev_err(&pdev->dev, "Failed to get mute line: %d\n", ret);
+		dev_err_probe(&pdev->dev, ret, "Failed to get mute line\n");
 		return ret;
 	}
 
-- 
2.25.1




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux