]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
ASoC: simple-card-utils: Avoid NULL deref in asoc_simple_set_tdm()
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Mon, 4 Apr 2022 11:32:52 +0000 (12:32 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 6 Apr 2022 14:50:04 +0000 (15:50 +0100)
commit51a630a7051f7f4f1cfdd64c20c7110f9907c230
tree09c18113d7e165774b3abab5eb18c7456d351d37
parent89bac792faf03fae5a9564bebfaacab53a029932
ASoC: simple-card-utils: Avoid NULL deref in asoc_simple_set_tdm()

Don't dereference simple_dai before it has been checked for NULL.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: 1e974e5b82b3 ("ASoC: audio_graph_card2: Add support for variable slot widths")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20220404113252.1152659-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/generic/simple-card-utils.c