diff options
author | Liam Girdwood <liam.r.girdwood@linux.intel.com> | 2014-07-30 20:18:32 +0800 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-07-30 13:24:21 +0100 |
commit | 30bba67c43c0dd36696d1209c19afc3f25f2f3f3 (patch) | |
tree | b63eab449330ebadb9d50e098b166a515072821a /sound/soc/intel | |
parent | 543ec637e00a9000772c315a8c98fa6ede563c5b (diff) | |
download | blackbird-op-linux-30bba67c43c0dd36696d1209c19afc3f25f2f3f3.tar.gz blackbird-op-linux-30bba67c43c0dd36696d1209c19afc3f25f2f3f3.zip |
ASoC: Intel: Check ops before we derefference pointers.
Check ops pointer members before we can derefference them.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/intel')
-rw-r--r-- | sound/soc/intel/sst-dsp.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sound/soc/intel/sst-dsp.c b/sound/soc/intel/sst-dsp.c index 0b715b20a2d7..cd23060a0d86 100644 --- a/sound/soc/intel/sst-dsp.c +++ b/sound/soc/intel/sst-dsp.c @@ -224,19 +224,23 @@ EXPORT_SYMBOL_GPL(sst_dsp_shim_update_bits64); 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); 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); int sst_dsp_boot(struct sst_dsp *sst) { - sst->ops->boot(sst); + if (sst->ops->boot) + sst->ops->boot(sst); + return 0; } EXPORT_SYMBOL_GPL(sst_dsp_boot); |