All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda: cirrus_scodec: fix an error code
@ 2023-09-27 12:44 Dan Carpenter
  2023-09-27 12:46 ` Richard Fitzgerald
  2023-09-30  7:47 ` Takashi Iwai
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2023-09-27 12:44 UTC (permalink / raw)
  To: James Schulman
  Cc: David Rhodes, Richard Fitzgerald, Jaroslav Kysela, Takashi Iwai,
	alsa-devel, patches, kernel-janitors

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>
---
 sound/pci/hda/cirrus_scodec_test.c | 4 ++--
 1 file 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;
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ALSA: hda: cirrus_scodec: fix an error code
  2023-09-27 12:44 [PATCH] ALSA: hda: cirrus_scodec: fix an error code Dan Carpenter
@ 2023-09-27 12:46 ` Richard Fitzgerald
  2023-09-30  7:47 ` Takashi Iwai
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Fitzgerald @ 2023-09-27 12:46 UTC (permalink / raw)
  To: Dan Carpenter, James Schulman
  Cc: David Rhodes, Jaroslav Kysela, Takashi Iwai, alsa-devel, patches,
	kernel-janitors

On 27/9/23 13:44, Dan Carpenter wrote:
> 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>
> ---
>   sound/pci/hda/cirrus_scodec_test.c | 4 ++--
>   1 file 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;

Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>

Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ALSA: hda: cirrus_scodec: fix an error code
  2023-09-27 12:44 [PATCH] ALSA: hda: cirrus_scodec: fix an error code Dan Carpenter
  2023-09-27 12:46 ` Richard Fitzgerald
@ 2023-09-30  7:47 ` Takashi Iwai
  1 sibling, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2023-09-30  7:47 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: James Schulman, David Rhodes, Richard Fitzgerald, Jaroslav Kysela,
	Takashi Iwai, alsa-devel, patches, kernel-janitors

On Wed, 27 Sep 2023 14:44:01 +0200,
Dan Carpenter wrote:
> 
> 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>

Applied now.  Thanks.


Takashi

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-09-30  8:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-27 12:44 [PATCH] ALSA: hda: cirrus_scodec: fix an error code Dan Carpenter
2023-09-27 12:46 ` Richard Fitzgerald
2023-09-30  7:47 ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.