diff mbox series

[-next] soundwire: stream: Fix error return code in do_bank_switch()

Message ID 20220307074039.117488-1-wangwensheng4@huawei.com (mailing list archive)
State New, archived
Headers show
Series [-next] soundwire: stream: Fix error return code in do_bank_switch() | expand

Commit Message

Wang Wensheng March 7, 2022, 7:40 a.m. UTC
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(+)

Comments

Pierre-Louis Bossart March 7, 2022, 3:24 p.m. UTC | #1
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;
>   		}
>
Vinod Koul April 5, 2022, 4:18 a.m. UTC | #2
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
diff mbox series

Patch

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;
 		}