summaryrefslogtreecommitdiffstats
path: root/drivers/soundwire
diff options
context:
space:
mode:
authorShreyas NC <shreyas.nc@intel.com>2018-07-27 14:44:09 +0530
committerVinod Koul <vkoul@kernel.org>2018-08-27 09:49:48 +0530
commit3fef1a2259c556cce34df2791688cb3001f81c92 (patch)
treea48864594dd14faa7d0fda5a7a1319ecd14632bc /drivers/soundwire
parent0aebe40bae6cf5652fdc3d05ecee15fbf5748194 (diff)
downloadlinux-3fef1a2259c556cce34df2791688cb3001f81c92.tar.bz2
soundwire: Fix incorrect exit after configuring stream
In sdw_stream_add_master() after the Master ports are configured, the stream is released incorrectly. So, fix it by avoiding stream release after configuring the Master for the stream. While at it, rename the label appropriately. Signed-off-by: Shreyas NC <shreyas.nc@intel.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire')
-rw-r--r--drivers/soundwire/stream.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c
index 7ba6d4d8cd03..b2682272503e 100644
--- a/drivers/soundwire/stream.c
+++ b/drivers/soundwire/stream.c
@@ -1112,7 +1112,7 @@ int sdw_stream_add_master(struct sdw_bus *bus,
"Master runtime config failed for stream:%s",
stream->name);
ret = -ENOMEM;
- goto error;
+ goto unlock;
}
ret = sdw_config_stream(bus->dev, stream, stream_config, false);
@@ -1123,9 +1123,11 @@ int sdw_stream_add_master(struct sdw_bus *bus,
if (ret)
goto stream_error;
+ goto unlock;
+
stream_error:
sdw_release_master_stream(stream);
-error:
+unlock:
mutex_unlock(&bus->bus_lock);
return ret;
}