firmware: cs_dsp: Perform NULL check in cs_dsp_coeff_write/read_ctrl
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Wed, 17 Nov 2021 13:22:57 +0000 (13:22 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 17 Nov 2021 22:16:25 +0000 (22:16 +0000)
commit86c6080407740937ed2ba0ccd181e947f77e2154
tree380b99c75928041a83a5fea186838acf473dff9a
parentdcee767667f44ed0d40a3debf507a3ba027a1994
firmware: cs_dsp: Perform NULL check in cs_dsp_coeff_write/read_ctrl

Add a NULL check to the cs_dsp_coeff_write/read_ctrl functions. This is
a major convenience for users of the cs_dsp library as it allows the call
to cs_dsp_get_ctl to be inlined with the call to read/write the control
itself.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20211117132300.1290-7-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/firmware/cirrus/cs_dsp.c