Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: SOF: ipc4-topology: Fix error code in sof_ipc4_volume_put()
@ 2022-06-16  4:31 Dan Carpenter
  2022-06-16  6:30 ` Péter Ujfalusi
  2022-06-16 11:15 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2022-06-16  4:31 UTC (permalink / raw)
  To: Pierre-Louis Bossart, Ranjani Sridharan
  Cc: alsa-devel, Kai Vehmanen, kernel-janitors, Bard Liao,
	Takashi Iwai, Peter Ujfalusi, Liam Girdwood, Mark Brown,
	Daniel Baluta, Rander Wang, sound-open-firmware

The sof_ipc4_volume_put() function returns type bool so returning
-ENOENT means returning true.  Return false instead.

Fixes: 955e84fc0b6d ("ASoC: SOF: ipc4-topology: Add control IO ops")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 sound/soc/sof/ipc4-control.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/sof/ipc4-control.c b/sound/soc/sof/ipc4-control.c
index 95ee121dd3cf..0d5a578c3496 100644
--- a/sound/soc/sof/ipc4-control.c
+++ b/sound/soc/sof/ipc4-control.c
@@ -142,7 +142,7 @@ static bool sof_ipc4_volume_put(struct snd_sof_control *scontrol,
 
 	if (!widget_found) {
 		dev_err(scomp->dev, "Failed to find widget for kcontrol %s\n", scontrol->name);
-		return -ENOENT;
+		return false;
 	}
 
 	ret = sof_ipc4_set_volume_data(sdev, swidget, scontrol);
-- 
2.35.1


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

* Re: [PATCH] ASoC: SOF: ipc4-topology: Fix error code in sof_ipc4_volume_put()
  2022-06-16  4:31 [PATCH] ASoC: SOF: ipc4-topology: Fix error code in sof_ipc4_volume_put() Dan Carpenter
@ 2022-06-16  6:30 ` Péter Ujfalusi
  2022-06-16 11:15 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Péter Ujfalusi @ 2022-06-16  6:30 UTC (permalink / raw)
  To: Dan Carpenter, Pierre-Louis Bossart, Ranjani Sridharan
  Cc: alsa-devel, Kai Vehmanen, Daniel Baluta, kernel-janitors,
	Takashi Iwai, Liam Girdwood, Mark Brown, Bard Liao, Rander Wang,
	sound-open-firmware



On 16/06/2022 07:31, Dan Carpenter wrote:
> The sof_ipc4_volume_put() function returns type bool so returning
> -ENOENT means returning true.  Return false instead.

Good catch,

Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>

> Fixes: 955e84fc0b6d ("ASoC: SOF: ipc4-topology: Add control IO ops")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
>  sound/soc/sof/ipc4-control.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/sof/ipc4-control.c b/sound/soc/sof/ipc4-control.c
> index 95ee121dd3cf..0d5a578c3496 100644
> --- a/sound/soc/sof/ipc4-control.c
> +++ b/sound/soc/sof/ipc4-control.c
> @@ -142,7 +142,7 @@ static bool sof_ipc4_volume_put(struct snd_sof_control *scontrol,
>  
>  	if (!widget_found) {
>  		dev_err(scomp->dev, "Failed to find widget for kcontrol %s\n", scontrol->name);
> -		return -ENOENT;
> +		return false;
>  	}
>  
>  	ret = sof_ipc4_set_volume_data(sdev, swidget, scontrol);

-- 
Péter

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

* Re: [PATCH] ASoC: SOF: ipc4-topology: Fix error code in sof_ipc4_volume_put()
  2022-06-16  4:31 [PATCH] ASoC: SOF: ipc4-topology: Fix error code in sof_ipc4_volume_put() Dan Carpenter
  2022-06-16  6:30 ` Péter Ujfalusi
@ 2022-06-16 11:15 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2022-06-16 11:15 UTC (permalink / raw)
  To: pierre-louis.bossart, ranjani.sridharan, dan.carpenter
  Cc: daniel.baluta, alsa-devel, kai.vehmanen, peter.ujfalusi,
	kernel-janitors, lgirdwood, tiwai, yung-chuan.liao, rander.wang,
	sound-open-firmware

On Thu, 16 Jun 2022 07:31:09 +0300, Dan Carpenter wrote:
> The sof_ipc4_volume_put() function returns type bool so returning
> -ENOENT means returning true.  Return false instead.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: SOF: ipc4-topology: Fix error code in sof_ipc4_volume_put()
      commit: 7acf970a6fbb3c10bb5979d0dc3ed42b161daf15

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

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

end of thread, other threads:[~2022-06-16 11:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-16  4:31 [PATCH] ASoC: SOF: ipc4-topology: Fix error code in sof_ipc4_volume_put() Dan Carpenter
2022-06-16  6:30 ` Péter Ujfalusi
2022-06-16 11:15 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox