From: Shreyas NC Date: Fri, 27 Jul 2018 09:14:09 +0000 (+0530) Subject: soundwire: Fix incorrect exit after configuring stream X-Git-Tag: v4.19~137^2~3^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3fef1a2259c556cce34df2791688cb3001f81c92;p=platform%2Fkernel%2Flinux-rpi.git 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 Acked-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul --- diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c index 7ba6d4d..b268227 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; }