]> git.baikalelectronics.ru Git - kernel.git/commit
firmware: cs_dsp: Move lockdep asserts to avoid potential null pointer
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Tue, 30 Nov 2021 10:28:42 +0000 (10:28 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 30 Nov 2021 13:08:12 +0000 (13:08 +0000)
commit293ed2acb75ef178bcb8d2ebf6e08a52ff0425bd
tree24afc49aa0faac3128b4d743b2afefac7d01a48e
parentf2d2011449630db3de046ae0a9babb8b263e9aaf
firmware: cs_dsp: Move lockdep asserts to avoid potential null pointer

Move the lockdep asserts until after the ctl pointer has been checked
for NULL, to avoid potentially NULL pointer dereferences.

Fixes: fb2f364fb5b9 ("firmware: cs_dsp: Add lockdep asserts to interface functions")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20211130102842.26410-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/firmware/cirrus/cs_dsp.c