diff options
author | Tom Rix <trix@redhat.com> | 2023-01-10 22:36:11 +0300 |
---|---|---|
committer | Tzung-Bi Shih <tzungbi@kernel.org> | 2023-01-11 06:27:56 +0300 |
commit | 2ae3c610e7d21bc4a27da2b71f7007f2c4efce01 (patch) | |
tree | 06f05cc8b8c7b30979d94a6c8b744f3f312171b0 /tools/perf/scripts/python/task-analyzer.py | |
parent | 9e69b1b27b13eb4eb85405900e290c0d539454bf (diff) | |
download | linux-2ae3c610e7d21bc4a27da2b71f7007f2c4efce01.tar.xz |
platform/chrome: cros_ec_lpc: initialize the buf variable
Clang static analysis reports this problem
drivers/platform/chrome/cros_ec_lpc.c:379:13: warning: The left operand
of '!=' is a garbage value [core.UndefinedBinaryOperatorResult]
if (buf[0] != 'E' || buf[1] != 'C') {
~~~~~~ ^
The check depends on the side effect of the read. When the read fails
or is short, a buf containing garbage could be mistaken as correct.
Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/20230110193611.3573777-1-trix@redhat.com
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions