Commit 30bba67c authored by Liam Girdwood's avatar Liam Girdwood Committed by Mark Brown

ASoC: Intel: Check ops before we derefference pointers.

Check ops pointer members before we can derefference them.
Signed-off-by: default avatarLiam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: default avatarJie Yang <yang.jie@intel.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 543ec637
...@@ -224,19 +224,23 @@ EXPORT_SYMBOL_GPL(sst_dsp_shim_update_bits64); ...@@ -224,19 +224,23 @@ EXPORT_SYMBOL_GPL(sst_dsp_shim_update_bits64);
void sst_dsp_dump(struct sst_dsp *sst) void sst_dsp_dump(struct sst_dsp *sst)
{ {
sst->ops->dump(sst); if (sst->ops->dump)
sst->ops->dump(sst);
} }
EXPORT_SYMBOL_GPL(sst_dsp_dump); EXPORT_SYMBOL_GPL(sst_dsp_dump);
void sst_dsp_reset(struct sst_dsp *sst) void sst_dsp_reset(struct sst_dsp *sst)
{ {
sst->ops->reset(sst); if (sst->ops->reset)
sst->ops->reset(sst);
} }
EXPORT_SYMBOL_GPL(sst_dsp_reset); EXPORT_SYMBOL_GPL(sst_dsp_reset);
int sst_dsp_boot(struct sst_dsp *sst) int sst_dsp_boot(struct sst_dsp *sst)
{ {
sst->ops->boot(sst); if (sst->ops->boot)
sst->ops->boot(sst);
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(sst_dsp_boot); EXPORT_SYMBOL_GPL(sst_dsp_boot);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment