]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: topology: Check if ops is set before dereference
authorAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Thu, 14 Jan 2021 16:36:02 +0000 (11:36 -0500)
committerMark Brown <broonie@kernel.org>
Thu, 21 Jan 2021 12:37:05 +0000 (12:37 +0000)
commitc384c6e53473c15dccbed4bd4a4fb26aa2c78aa2
tree0bf35145a9db52f3eea0b6614a8e8819dffe6cea
parent9287e48ca011208aadfae3e3b114b7ace39deefc
ASoC: topology: Check if ops is set before dereference

Topology can be created without ops overrides, in that case trying to
assign any value would lead to dereferencing NULL pointer.

Other places in code have either checks for tplg->ops or loop using
*_count variables, hence they can't dereference NULL pointer and there
is no need to add more checks.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20210114163602.911205-3-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-topology.c