Commit c258bcc2 authored by Dan Carpenter's avatar Dan Carpenter Committed by Takashi Iwai

ALSA: hda: cirrus_scodec: fix an error code

The "ret" variable is zero but we should return -EINVAL.

Fixes: 2144833e ("ALSA: hda: cirrus_scodec: Add KUnit test")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarRichard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/5eea7fd5-67c8-4ed4-b5b3-b85dfb7572cc@moroto.mountainSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent f5cc9cdf
...@@ -137,8 +137,8 @@ static int cirrus_scodec_test_create_gpio(struct kunit *test) ...@@ -137,8 +137,8 @@ static int cirrus_scodec_test_create_gpio(struct kunit *test)
priv->gpio_priv = dev_get_drvdata(&priv->gpio_pdev->dev); priv->gpio_priv = dev_get_drvdata(&priv->gpio_pdev->dev);
if (!priv->gpio_priv) { if (!priv->gpio_priv) {
platform_device_put(priv->gpio_pdev); platform_device_put(priv->gpio_pdev);
KUNIT_FAIL(test, "Failed to get gpio private data: %d\n", ret); KUNIT_FAIL(test, "Failed to get gpio private data\n");
return ret; return -EINVAL;
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment