]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: SOF: trace: fix unconditional free in trace release
authorKai Vehmanen <kai.vehmanen@linux.intel.com>
Fri, 24 Jan 2020 21:36:22 +0000 (15:36 -0600)
committerMark Brown <broonie@kernel.org>
Mon, 27 Jan 2020 17:52:09 +0000 (17:52 +0000)
commit6ad4912de7768e3442cc90c3e105b636fdbc923c
treec40211cb7a850ea515cebca5948cf6ac28090d2d
parentddc05aca77b39bd07a41d2b11b27d4677e7c05c0
ASoC: SOF: trace: fix unconditional free in trace release

Check if DMA pages were successfully allocated in initialization
before calling free. For many types of memory (like sgbufs)
the extra free is harmless, but not all backends track allocation
state, so add an explicit check.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200124213625.30186-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/trace.c