summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/max98357a.c
diff options
context:
space:
mode:
authorAnatol Pomozov <anatol.pomozov@gmail.com>2015-07-12 08:14:21 -0700
committerMark Brown <broonie@kernel.org>2015-07-13 19:13:03 +0100
commit4ab0c591c1482c90d14c1d11bf4b469c54a31ecc (patch)
tree507ab04ea8529885e6284c0566c4f98231389fb3 /sound/soc/codecs/max98357a.c
parent508e61953f7b2c5c828412e5b46fa99b8a3fbaa1 (diff)
ASoC: max98357a: Do not print error message on asoc/gpio errors
gpiolib/asoc system already prints enough info if there are any problems. Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/max98357a.c')
-rw-r--r--sound/soc/codecs/max98357a.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/sound/soc/codecs/max98357a.c b/sound/soc/codecs/max98357a.c
index b9e1131bab74..e88119a71b84 100644
--- a/sound/soc/codecs/max98357a.c
+++ b/sound/soc/codecs/max98357a.c
@@ -63,11 +63,9 @@ static int max98357a_codec_probe(struct snd_soc_codec *codec)
struct gpio_desc *sdmode;
sdmode = devm_gpiod_get_optional(codec->dev, "sdmode", GPIOD_OUT_LOW);
- if (IS_ERR(sdmode)) {
- dev_err(codec->dev, "%s() unable to get sdmode GPIO: %ld\n",
- __func__, PTR_ERR(sdmode));
+ if (IS_ERR(sdmode))
return PTR_ERR(sdmode);
- }
+
snd_soc_codec_set_drvdata(codec, sdmode);
return 0;
@@ -106,15 +104,8 @@ static struct snd_soc_dai_driver max98357a_dai_driver = {
static int max98357a_platform_probe(struct platform_device *pdev)
{
- int ret;
-
- ret = snd_soc_register_codec(&pdev->dev, &max98357a_codec_driver,
+ return snd_soc_register_codec(&pdev->dev, &max98357a_codec_driver,
&max98357a_dai_driver, 1);
- if (ret)
- dev_err(&pdev->dev, "%s() error registering codec driver: %d\n",
- __func__, ret);
-
- return ret;
}
static int max98357a_platform_remove(struct platform_device *pdev)