summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Weber <aweber.kernel@gmail.com>2024-05-25 15:28:10 +0200
committerMark Brown <broonie@kernel.org>2024-05-29 13:45:45 +0100
commit255009d22c185623140de600a5fb54f0fd541bb8 (patch)
treec8112e60974f309ab0bd6c8c259ef3c37e49770d
parentc91d0c2e198d4453e634fe43a72ccbc59811af17 (diff)
ASoC: samsung: midas_wm1811: Use dev_err_probe where appropriate
Since we're already using it in the newly-added GPIO requests for jack detection, extend it to the previous checks as well. Signed-off-by: Artur Weber <aweber.kernel@gmail.com> Link: https://msgid.link/r/20240525-midas-wm1811-gpio-jack-v4-6-f488e03bd8c7@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/samsung/midas_wm1811.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sound/soc/samsung/midas_wm1811.c b/sound/soc/samsung/midas_wm1811.c
index 3a6d3fc8152a..3a269c7de169 100644
--- a/sound/soc/samsung/midas_wm1811.c
+++ b/sound/soc/samsung/midas_wm1811.c
@@ -590,17 +590,15 @@ static int midas_probe(struct platform_device *pdev)
card->dev = dev;
priv->gpio_fm_sel = devm_gpiod_get_optional(dev, "fm-sel", GPIOD_OUT_HIGH);
- if (IS_ERR(priv->gpio_fm_sel)) {
- dev_err(dev, "Failed to get FM selection GPIO\n");
- return PTR_ERR(priv->gpio_fm_sel);
- }
+ if (IS_ERR(priv->gpio_fm_sel))
+ return dev_err_probe(dev, PTR_ERR(priv->gpio_fm_sel),
+ "Failed to get FM selection GPIO\n");
priv->gpio_lineout_sel = devm_gpiod_get_optional(dev, "lineout-sel",
GPIOD_OUT_HIGH);
- if (IS_ERR(priv->gpio_lineout_sel)) {
- dev_err(dev, "Failed to get line out selection GPIO\n");
- return PTR_ERR(priv->gpio_lineout_sel);
- }
+ if (IS_ERR(priv->gpio_lineout_sel))
+ return dev_err_probe(dev, PTR_ERR(priv->gpio_lineout_sel),
+ "Failed to get line out selection GPIO\n");
priv->gpio_headset_detect = devm_gpiod_get_optional(dev,
"headset-detect", GPIOD_IN);