]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: soc-compress: Change the check for codec_dai
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Thu, 10 Mar 2022 03:00:41 +0000 (11:00 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 14 Mar 2022 08:29:11 +0000 (08:29 +0000)
commitc3110f2c983f4cb7b1e9752088aaf5506c6c47ab
treed01ea3a31450b2cdae63c1e935fb0f945f7f4cdc
parent7661001b94a6fdf0473b96744cea56bb97ff4acf
ASoC: soc-compress: Change the check for codec_dai

It should be better to reverse the check on codec_dai
and returned early in order to be easier to understand.

Fixes: c2a6486f9d7a ("ASoC: soc-compress: prevent the potentially use of null pointer")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220310030041.1556323-1-jiasheng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-compress.c