diff options
| author | Pierre-Louis Bossart <[email protected]> | 2023-07-31 16:37:47 -0500 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2023-07-31 23:22:17 +0100 |
| commit | 71d76768fbe72aa70dd61d5714a5579dc4ca61cb (patch) | |
| tree | d2044493e13175ea244b6a2435ffca450e1e9c96 /tools/perf/scripts/python | |
| parent | 64778b022e629b8ffa97d23a9adbf670aa3bb1d8 (diff) | |
ASoC: Intel: atom: remove static analysis false positive
make KCFLAGS='-fanalyzer' sound/soc/intel/atom/ reports a possible
NULL pointer dereference.
sound/soc/intel/atom/sst/sst_stream.c:221:40: error: dereference of
NULL ‘block’ [CWE-476] [-Werror=analyzer-null-dereference]
221 | unsigned char *r = block->data;
This is a false-positive, the GCC analyzer generated that report by
considering if (bytes->block) as true in some cases and false in
others.
We can simplify the code and use a local variable so that static
analysis does not try to look for cases where bytes->block can be
modified concurrently.
Signed-off-by: Pierre-Louis Bossart <[email protected]>
Reviewed-by: Rander Wang <[email protected]>
Reviewed-by: Daniel Baluta <[email protected]>
Reviewed-by: Yaochun Hung <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions