linux-stable/drivers/soundwire
Rander Wang 342260fe82 soundwire: stream: fix memory leak in stream config error path
[ Upstream commit 48f17f96a8 ]

When stream config is failed, master runtime will release all
slave runtime in the slave_rt_list, but slave runtime is not
added to the list at this time. This patch frees slave runtime
in the config error path to fix the memory leak.

Fixes: 89e590535f ("soundwire: Add support for SoundWire stream management")
Signed-off-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Keyon Jie <yang.jie@intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20210331004610.12242-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-22 10:59:30 +02:00
..
bus.c soundwire: bus: Fix device found flag correctly 2021-05-22 10:59:29 +02:00
bus.h
bus_type.c
cadence_master.c soundwire: cadence_master: fix definitions for INTSTAT0/1 2019-09-06 10:21:56 +02:00
cadence_master.h
intel.c soundwire: intel: fix PDI/stream mapping for Bulk 2019-12-31 16:35:55 +01:00
intel.h
intel_init.c soundwire: intel: Fix uninitialized adev deref 2019-11-20 18:45:22 +01:00
Kconfig soundwire: depend on ACPI 2019-11-12 19:20:38 +01:00
Makefile soundwire: fix regmap dependencies and align with other serial links 2019-10-07 18:57:27 +02:00
mipi_disco.c
slave.c
stream.c soundwire: stream: fix memory leak in stream config error path 2021-05-22 10:59:30 +02:00