[PATCH v2 1/6] ASoC: samsung: aries_wm8994: Preserve gpiod_to_irq() error codes
| Newsgroups | org.kernel.vger.linux-sound,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
From: bui duc phuc <[email protected]> gpiod_to_irq() can currently return several error codes, including -ENXIO, -ENODEV, -EPROBE_DEFER, and -EINVAL. Return the original error code instead of overwriting it with -EINVAL, so that the actual failure reason is preserved. Reviewed-by: Cezary Rojewski <[email protected]> Signed-off-by: bui duc phuc <[email protected]> --- Changes in v2: - Add Cezary Rojewski's Reviewed-by tag. sound/soc/samsung/aries_wm8994.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/samsung/aries_wm8994.c b/sound/soc/samsung/aries_wm8994.c index 6db91b73f25c..58e3e08225de 100644 --- a/sound/soc/samsung/aries_wm8994.c +++ b/sound/soc/samsung/aries_wm8994.c @@ -374,7 +374,7 @@ static int aries_late_probe(struct snd_soc_card *card) irq = gpiod_to_irq(priv->gpio_headset_detect); if (irq < 0) { dev_err(card->dev, "Failed to map headset detect gpio to irq"); - return -EINVAL; + return irq; } ret = devm_request_threaded_irq(card->dev, irq, NULL, -- 2.43.0