public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] ALSA: firewire-motu: fix error return code in snd_motu_stream_reserve_duplex()
@ 2021-06-03 14:32 Yang Yingliang
  2021-06-03 15:01 ` Takashi Sakamoto
  2021-06-04  6:48 ` Takashi Iwai
  0 siblings, 2 replies; 3+ messages in thread
From: Yang Yingliang @ 2021-06-03 14:32 UTC (permalink / raw)
  To: linux-kernel, alsa-devel; +Cc: tiwai, o-takashi

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: e50dfac81f73 ("ALSA: firewire-motu: cache event ticks in source packet header per data block")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 sound/firewire/motu/motu-stream.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/firewire/motu/motu-stream.c b/sound/firewire/motu/motu-stream.c
index 43ff5be32b15..9e6ca39ebd7f 100644
--- a/sound/firewire/motu/motu-stream.c
+++ b/sound/firewire/motu/motu-stream.c
@@ -191,7 +191,7 @@ int snd_motu_stream_reserve_duplex(struct snd_motu *motu, unsigned int rate,
 		if (!motu->cache.event_offsets) {
 			fw_iso_resources_free(&motu->tx_resources);
 			fw_iso_resources_free(&motu->rx_resources);
-			return err;
+			return -ENOMEM;
 		}
 	}
 
-- 
2.25.1


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

* Re: [PATCH -next] ALSA: firewire-motu: fix error return code in snd_motu_stream_reserve_duplex()
  2021-06-03 14:32 [PATCH -next] ALSA: firewire-motu: fix error return code in snd_motu_stream_reserve_duplex() Yang Yingliang
@ 2021-06-03 15:01 ` Takashi Sakamoto
  2021-06-04  6:48 ` Takashi Iwai
  1 sibling, 0 replies; 3+ messages in thread
From: Takashi Sakamoto @ 2021-06-03 15:01 UTC (permalink / raw)
  To: Yang Yingliang; +Cc: linux-kernel, alsa-devel, tiwai

Hi,

On Thu, Jun 03, 2021 at 10:32:03PM +0800, Yang Yingliang wrote:
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
> 
> Fixes: e50dfac81f73 ("ALSA: firewire-motu: cache event ticks in source packet header per data block")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
>  sound/firewire/motu/motu-stream.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/firewire/motu/motu-stream.c b/sound/firewire/motu/motu-stream.c
> index 43ff5be32b15..9e6ca39ebd7f 100644
> --- a/sound/firewire/motu/motu-stream.c
> +++ b/sound/firewire/motu/motu-stream.c
> @@ -191,7 +191,7 @@ int snd_motu_stream_reserve_duplex(struct snd_motu *motu, unsigned int rate,
>  		if (!motu->cache.event_offsets) {
>  			fw_iso_resources_free(&motu->tx_resources);
>  			fw_iso_resources_free(&motu->rx_resources);
> -			return err;
> +			return -ENOMEM;
>  		}
>  	}
>  
> -- 
> 2.25.1

Indeed. Nice to catch it.

Acked-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>


Thanks

Takashi Sakamoto

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

* Re: [PATCH -next] ALSA: firewire-motu: fix error return code in snd_motu_stream_reserve_duplex()
  2021-06-03 14:32 [PATCH -next] ALSA: firewire-motu: fix error return code in snd_motu_stream_reserve_duplex() Yang Yingliang
  2021-06-03 15:01 ` Takashi Sakamoto
@ 2021-06-04  6:48 ` Takashi Iwai
  1 sibling, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2021-06-04  6:48 UTC (permalink / raw)
  To: Yang Yingliang; +Cc: linux-kernel, alsa-devel, tiwai, o-takashi

On Thu, 03 Jun 2021 16:32:03 +0200,
Yang Yingliang wrote:
> 
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
> 
> Fixes: e50dfac81f73 ("ALSA: firewire-motu: cache event ticks in source packet header per data block")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>

Thanks, applied.


Takashi

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

end of thread, other threads:[~2021-06-04  6:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-03 14:32 [PATCH -next] ALSA: firewire-motu: fix error return code in snd_motu_stream_reserve_duplex() Yang Yingliang
2021-06-03 15:01 ` Takashi Sakamoto
2021-06-04  6:48 ` Takashi Iwai

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