diff options
author | Vinod Koul <vinod.koul@intel.com> | 2018-03-08 11:33:13 +0530 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2018-03-08 11:33:13 +0530 |
commit | 82720ab226383b278c49e5d0276800cc342f2ace (patch) | |
tree | f0558d96fc10970e5c9b153db64d03863fbaee89 | |
parent | 5b7bd3da34fa32f0a64392a70a33a0fd18c5c4de (diff) | |
download | sdw_old-topic/vkoul/sdw_remove_ml1.tar.gz |
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r-- | drivers/soundwire/stream.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c index e8a41c36ac3af..ade3b573ed68d 100644 --- a/drivers/soundwire/stream.c +++ b/drivers/soundwire/stream.c @@ -186,8 +186,6 @@ static void sdw_release_master_stream(struct sdw_stream_runtime *stream) sdw_release_slave_stream(s_rt->slave, stream); list_del(&m_rt->bus_node); - stream->m_rt = NULL; - kfree(m_rt); } /** @@ -207,6 +205,8 @@ int sdw_stream_remove_master(struct sdw_bus *bus, sdw_release_master_stream(stream); sdw_master_port_deconfig(bus, stream->m_rt); stream->state = SDW_STREAM_RELEASE; + kfree(stream->m_rt); + stream->m_rt = NULL; mutex_unlock(&bus->bus_lock); |