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.
Signed-off-by: bui duc phuc <[email protected]>
---
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.