From: Wang Wensheng Date: Mon, 7 Mar 2022 07:40:39 +0000 (+0000) Subject: soundwire: stream: Fix error return code in do_bank_switch() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a7ad7ce41815145ccdb69554b2618fc084fc38a1;p=linux.git soundwire: stream: Fix error return code in do_bank_switch() 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 Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220307074039.117488-1-wangwensheng4@huawei.com Signed-off-by: Vinod Koul --- diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c index f273459b20234..d34150559142f 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; }