All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] soundwire: stream: Fix error return code in do_bank_switch()
@ 2022-03-07  7:40 ` Wang Wensheng
  0 siblings, 0 replies; 5+ messages in thread
From: Wang Wensheng @ 2022-03-07  7:40 UTC (permalink / raw)
  To: vkoul, yung-chuan.liao, pierre-louis.bossart, sanyog.r.kale,
	alsa-devel, linux-kernel
  Cc: xuqiang36

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

Signed-off-by: Wang Wensheng <wangwensheng4@huawei.com>
---
 drivers/soundwire/stream.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c
index 980f26d49b66..553131597af6 100644
--- a/drivers/soundwire/stream.c
+++ b/drivers/soundwire/stream.c
@@ -822,6 +822,7 @@ static int do_bank_switch(struct sdw_stream_runtime *stream)
 		} else if (multi_link) {
 			dev_err(bus->dev,
 				"Post bank switch ops not implemented\n");
+			ret = -EINVAL;
 			goto error;
 		}
 
-- 
2.17.1


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

* [PATCH -next] soundwire: stream: Fix error return code in do_bank_switch()
@ 2022-03-07  7:40 ` Wang Wensheng
  0 siblings, 0 replies; 5+ messages in thread
From: Wang Wensheng @ 2022-03-07  7:40 UTC (permalink / raw)
  To: vkoul, yung-chuan.liao, pierre-louis.bossart, sanyog.r.kale,
	alsa-devel, linux-kernel
  Cc: xuqiang36

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

Signed-off-by: Wang Wensheng <wangwensheng4@huawei.com>
---
 drivers/soundwire/stream.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c
index 980f26d49b66..553131597af6 100644
--- a/drivers/soundwire/stream.c
+++ b/drivers/soundwire/stream.c
@@ -822,6 +822,7 @@ static int do_bank_switch(struct sdw_stream_runtime *stream)
 		} else if (multi_link) {
 			dev_err(bus->dev,
 				"Post bank switch ops not implemented\n");
+			ret = -EINVAL;
 			goto error;
 		}
 
-- 
2.17.1


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

* Re: [PATCH -next] soundwire: stream: Fix error return code in do_bank_switch()
  2022-03-07  7:40 ` Wang Wensheng
  (?)
@ 2022-03-07 15:24 ` Pierre-Louis Bossart
  -1 siblings, 0 replies; 5+ messages in thread
From: Pierre-Louis Bossart @ 2022-03-07 15:24 UTC (permalink / raw)
  To: Wang Wensheng, vkoul, yung-chuan.liao, sanyog.r.kale, alsa-devel,
	linux-kernel
  Cc: xuqiang36



On 3/7/22 01:40, Wang Wensheng wrote:
> Fix to return a negative error code from the error handling case instead
> of 0, as done elsewhere in this function.
> 
> Signed-off-by: Wang Wensheng <wangwensheng4@huawei.com>

Thanks for the patch, sounds good to me.

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

> ---
>   drivers/soundwire/stream.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c
> index 980f26d49b66..553131597af6 100644
> --- a/drivers/soundwire/stream.c
> +++ b/drivers/soundwire/stream.c
> @@ -822,6 +822,7 @@ static int do_bank_switch(struct sdw_stream_runtime *stream)
>   		} else if (multi_link) {
>   			dev_err(bus->dev,
>   				"Post bank switch ops not implemented\n");
> +			ret = -EINVAL;
>   			goto error;
>   		}
>   

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

* Re: [PATCH -next] soundwire: stream: Fix error return code in do_bank_switch()
  2022-03-07  7:40 ` Wang Wensheng
@ 2022-04-05  4:18   ` Vinod Koul
  -1 siblings, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2022-04-05  4:18 UTC (permalink / raw)
  To: Wang Wensheng
  Cc: alsa-devel, pierre-louis.bossart, linux-kernel, xuqiang36,
	sanyog.r.kale, yung-chuan.liao

On 07-03-22, 07:40, Wang Wensheng wrote:
> Fix to return a negative error code from the error handling case instead
> of 0, as done elsewhere in this function.

Applied, thanks

-- 
~Vinod

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

* Re: [PATCH -next] soundwire: stream: Fix error return code in do_bank_switch()
@ 2022-04-05  4:18   ` Vinod Koul
  0 siblings, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2022-04-05  4:18 UTC (permalink / raw)
  To: Wang Wensheng
  Cc: yung-chuan.liao, pierre-louis.bossart, sanyog.r.kale, alsa-devel,
	linux-kernel, xuqiang36

On 07-03-22, 07:40, Wang Wensheng wrote:
> Fix to return a negative error code from the error handling case instead
> of 0, as done elsewhere in this function.

Applied, thanks

-- 
~Vinod

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

end of thread, other threads:[~2022-04-05  4:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-07  7:40 [PATCH -next] soundwire: stream: Fix error return code in do_bank_switch() Wang Wensheng
2022-03-07  7:40 ` Wang Wensheng
2022-03-07 15:24 ` Pierre-Louis Bossart
2022-04-05  4:18 ` Vinod Koul
2022-04-05  4:18   ` Vinod Koul

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.