]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 20 May 2022 12:40:19 +0000 (14:40 +0200)
commit5d68257eb39c078e43cde892c5fe8358e5b6db43
treea830f9cdc7c15db88128d8a95f82842a847e10a1
parent2d9690a872a04a7adf071cacca1276a204884c8f
ASoC: soc-compress: Change the check for codec_dai

BugLink: https://bugs.launchpad.net/bugs/1969110
commit ccb4214f7f2a8b75acf493f31128e464ee1a3536 upstream.

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

Fixes: de2c6f98817f ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 63351e2e13625435843f901c8aa14751e09b6f45)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
sound/soc/soc-compress.c