aboutsummaryrefslogtreecommitdiff
path: root/sound/pci
diff options
context:
space:
mode:
authorGravatar Dan Carpenter <dan.carpenter@linaro.org> 2023-09-27 15:44:01 +0300
committerGravatar Takashi Iwai <tiwai@suse.de> 2023-09-30 09:47:17 +0200
commitc258bcc289e6920038186eae38b2b7aa9786d796 (patch)
tree57625fa05050acf185e406723ed9694a2fa48a02 /sound/pci
parentALSA: usx2y: Annotate struct snd_usx2y_urb_seq with __counted_by (diff)
downloadlinux-c258bcc289e6920038186eae38b2b7aa9786d796.tar.gz
linux-c258bcc289e6920038186eae38b2b7aa9786d796.tar.bz2
linux-c258bcc289e6920038186eae38b2b7aa9786d796.zip
ALSA: hda: cirrus_scodec: fix an error code
The "ret" variable is zero but we should return -EINVAL. Fixes: 2144833e7b41 ("ALSA: hda: cirrus_scodec: Add KUnit test") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/5eea7fd5-67c8-4ed4-b5b3-b85dfb7572cc@moroto.mountain Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/cirrus_scodec_test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/hda/cirrus_scodec_test.c b/sound/pci/hda/cirrus_scodec_test.c
index 5eb590cd4fe2..8ae373676bd1 100644
--- a/sound/pci/hda/cirrus_scodec_test.c
+++ b/sound/pci/hda/cirrus_scodec_test.c
@@ -137,8 +137,8 @@ static int cirrus_scodec_test_create_gpio(struct kunit *test)
priv->gpio_priv = dev_get_drvdata(&priv->gpio_pdev->dev);
if (!priv->gpio_priv) {
platform_device_put(priv->gpio_pdev);
- KUNIT_FAIL(test, "Failed to get gpio private data: %d\n", ret);
- return ret;
+ KUNIT_FAIL(test, "Failed to get gpio private data\n");
+ return -EINVAL;
}
return 0;