]> www.infradead.org Git - users/jedix/linux-maple.git/commit
soundwire: stream: add alloc/config/free helpers for ports
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Wed, 26 Jan 2022 01:17:00 +0000 (09:17 +0800)
committerVinod Koul <vkoul@kernel.org>
Fri, 11 Feb 2022 06:45:36 +0000 (12:15 +0530)
commit6ccf3292e4ff1d2244677239eba27532bd7b71f9
tree1c544df6fd784b81bc53ddfd1fddd8156013672a
parent5ec17b98f1d4af7035ca1824f7218a0026ebbf1b
soundwire: stream: add alloc/config/free helpers for ports

The existing code only has a config helper that allocates memory,
start adding alloc/config/free for ports, as a first step in the
simplification of the stream API.

This change removes a kfree() on a configuration error, this should
have not impact on existing platforms and error handling will be
revisited in follow-up patches to make sure invalid configurations
have not impact on memory allocation.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220126011715.28204-5-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/soundwire/stream.c