[alsa-devel] [PATCH 3/3] ASoC: max98357a: Do not print error message on gpio get

Anatol Pomozov anatol.pomozov at gmail.com
Sun Jul 12 08:56:42 CEST 2015


gpiolib system already prints enough info if there are any problems with
the gpio.

Signed-off-by: Anatol Pomozov <anatol.pomozov at gmail.com>
---
 sound/soc/codecs/max98357a.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/max98357a.c b/sound/soc/codecs/max98357a.c
index 0d87d35..d669b0c 100644
--- a/sound/soc/codecs/max98357a.c
+++ b/sound/soc/codecs/max98357a.c
@@ -64,11 +64,9 @@ static int max98357a_codec_probe(struct snd_soc_codec *codec)
 	struct gpio_desc *sdmode;
 
 	sdmode = devm_gpiod_get(codec->dev, "sdmode", GPIOD_OUT_LOW);
-	if (IS_ERR(sdmode) && (PTR_ERR(sdmode) != -ENOENT)) {
-		dev_err(codec->dev, "%s() unable to get sdmode GPIO: %ld\n",
-				__func__, PTR_ERR(sdmode));
+	if (IS_ERR(sdmode) && (PTR_ERR(sdmode) != -ENOENT))
 		return PTR_ERR(sdmode);
-	}
+
 	snd_soc_codec_set_drvdata(codec, sdmode);
 
 	return 0;
-- 
2.4.5



More information about the Alsa-devel mailing list