Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3fef1a22 authored by Shreyas NC's avatar Shreyas NC Committed by Vinod Koul
Browse files

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: default avatarShreyas NC <shreyas.nc@intel.com>
Acked-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 0aebe40b
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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;
}