]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: SOF: compress: fix null check after dereference
authorWeiguo Li <liwg06@foxmail.com>
Thu, 10 Mar 2022 17:16:48 +0000 (11:16 -0600)
committerMark Brown <broonie@kernel.org>
Fri, 11 Mar 2022 13:40:54 +0000 (13:40 +0000)
commitb4e59e00f9e465b9f2f41ce595a7fed3ba91a331
treeeb07c4f35e29067b2d597341b02cc268d57bae73
parent58b3680474772ea2173de89568f5651468bc93db
ASoC: SOF: compress: fix null check after dereference

"cstream" is dereferenced but null checked later. Swap their
positions to avoid potential null dereference.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Weiguo Li <liwg06@foxmail.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220310171651.249385-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/compress.c