1

ASoC: samsung: midas_wm1811: Fix error code in probe()

This accidentally returns success instead of -EINVAL.

Fixes: c91d0c2e19 ("ASoC: samsung: midas_wm1811: Add GPIO-based headset jack detection")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Acked-by: Artur Weber <aweber.kernel@gmail.com>
Link: https://lore.kernel.org/r/01590109-cf27-404b-88ff-b42bb73ca1c6@moroto.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Dan Carpenter 2024-06-08 17:24:31 +03:00 committed by Mark Brown
parent c38082bf22
commit 5c33876a20
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -623,7 +623,7 @@ static int midas_probe(struct platform_device *pdev)
if (channel_type != IIO_VOLTAGE) { if (channel_type != IIO_VOLTAGE) {
dev_err(dev, "ADC channel is not voltage\n"); dev_err(dev, "ADC channel is not voltage\n");
return ret; return -EINVAL;
} }
priv->gpio_headset_key = devm_gpiod_get(dev, "headset-key", priv->gpio_headset_key = devm_gpiod_get(dev, "headset-key",