diff options
| author | Tom Rix <[email protected]> | 2022-07-02 11:39:04 -0400 |
|---|---|---|
| committer | Lyude Paul <[email protected]> | 2022-07-15 15:12:22 -0400 |
| commit | bd8408e69a47f8e9f5d95c5d919413fafecc1e73 (patch) | |
| tree | 21d10c6649f5a89aedd0d462ec9263da64fe3f45 /tools/perf/scripts/python/netdev-times.py | |
| parent | 59dad4a0d1862dcd15405f3217a59b1fac01daf0 (diff) | |
drm/nouveau/bios: set info only when the return is not 0
clang static analysis reports
drivers/gpu/drm/nouveau/nvkm/subdev/bios/pmu.c:68:17: warning: The right operand of '*' is a garbage value [core.UndefinedBinaryOperatorResult]
switch (!!data * *ver) {
^ ~~~~
A switch statement with only a default should be reduced to an if.
If nvbios_pmuEp() returns 0, via the data variable, the output info parameter
is not used. So set info only when data is not 0.
The struct nvbios_pmuE only has the type and data elements. Since both of these
are explicitly set, memset is not needed. So remove it.
Signed-off-by: Tom Rix <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
Signed-off-by: Lyude Paul <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/netdev-times.py')
0 files changed, 0 insertions, 0 deletions