All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] ASoC: SOF: compr: Add compress ops implementation
@ 2022-02-10  8:34 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2022-02-10  8:34 UTC (permalink / raw)
  To: daniel.baluta; +Cc: alsa-devel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-10  8:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-10  8:34 [bug report] ASoC: SOF: compr: Add compress ops implementation Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.