[bug report] ASoC: SOF: compr: Add compress ops implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Daniel Baluta,

This is a semi-automatic email about new static checker warnings.

The patch 6324cf901e14: "ASoC: SOF: compr: Add compress ops 
implementation" from Jan 20, 2022, leads to the following Smatch 
complaint:

    sound/soc/sof/compress.c:54 snd_sof_compr_fragment_elapsed()
    warn: variable dereferenced before check 'cstream' (see line 48)

sound/soc/sof/compress.c
    47	{
    48		struct snd_soc_pcm_runtime *rtd = cstream->private_data;
    49		struct snd_compr_runtime *crtd = cstream->runtime;
                                                 ^^^^^^^^^^^^^^^^
The patch adds a new dereference

    50		struct snd_soc_component *component;
    51		struct snd_compr_tstamp *tstamp;
    52		struct snd_sof_pcm *spcm;
    53	
    54		if (!cstream)
                    ^^^^^^^^
The old code assumed "cstream" could be NULL

    55			return;
    56	

regards,
dan carpenter



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux