diff options
| author | Pierre-Louis Bossart <[email protected]> | 2023-07-31 16:37:46 -0500 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2023-07-31 23:22:17 +0100 |
| commit | 64778b022e629b8ffa97d23a9adbf670aa3bb1d8 (patch) | |
| tree | ab34e0b921bc2d7699c81b334a6f126c6c887df5 /tools/perf/scripts/python | |
| parent | 8cf5286216dcfb942f0e4d7c23ebe06c2ebc1bed (diff) | |
ASoC: Intel: bdw_rt286: add checks to avoid static analysis warnings
snd_soc_card_get_codec_dai() can return NULL, but that value is not
checked for, leading to false-positive static analysis warnings
sound/soc/intel/boards/bdw_rt286.c:190:16: error: dereference of NULL
‘codec_dai’ [CWE-476] [-Werror=analyzer-null-dereference]
190 | return snd_soc_component_set_jack(codec_dai->component, NULL, NULL);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
‘card_suspend_pre’: event 1
|
| 190 | return snd_soc_component_set_jack(codec_dai->component, NULL, NULL);
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (1) dereference of NULL ‘codec_dai’
This NULL dereference cannot happen, the codec-dai "rt286-aif1" must exists
otherwise the card would not be created. Static analysis cannot know
that however so we might as well squelch this report.
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