If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
New smatch warnings:
sound/soc/sof/compress.c:54 snd_sof_compr_fragment_elapsed() warn: variable dereferenced before check 'cstream' (see line 48)
vim +/cstream +54 sound/soc/sof/compress.c
858f7a5c45cacb Daniel Baluta 2021-10-04 46 void snd_sof_compr_fragment_elapsed(struct snd_compr_stream *cstream)
858f7a5c45cacb Daniel Baluta 2021-10-04 47 {
6324cf901e14c6 Daniel Baluta 2022-01-20 @48 struct snd_soc_pcm_runtime *rtd = cstream->private_data;
^^^^^^^^^^^^^^^^^^^^^^
6324cf901e14c6 Daniel Baluta 2022-01-20 49 struct snd_compr_runtime *crtd = cstream->runtime;
^^^^^^^^^^^^^^^^^
Dereference
858f7a5c45cacb Daniel Baluta 2021-10-04 50 struct snd_soc_component *component;
6324cf901e14c6 Daniel Baluta 2022-01-20 51 struct snd_compr_tstamp *tstamp;
858f7a5c45cacb Daniel Baluta 2021-10-04 52 struct snd_sof_pcm *spcm;
858f7a5c45cacb Daniel Baluta 2021-10-04 53
858f7a5c45cacb Daniel Baluta 2021-10-04 @54 if (!cstream)
^^^^^^^^
Checked too late