diff options
author | Luck, Tony <[email protected]> | 2018-09-14 13:19:05 -0700 |
---|---|---|
committer | Borislav Petkov <[email protected]> | 2018-09-15 11:41:08 +0200 |
commit | c968ed08594dadb788a93dc2bc128ed4ef35c93e (patch) | |
tree | 8448f6d981ed72aa90061e962a74622364989476 /tools/perf/util/trace-event-scripting.c | |
parent | 8489b17ce29d9a35a36c08bbea93cdce4c98a6ad (diff) |
EDAC, sb_edac: Fix signedness bugs in *_get_ha() functions
A static checker gave the following warnings:
drivers/edac/sb_edac.c:1030 ibridge_get_ha() warn: signedness bug returning '(-22)'
drivers/edac/sb_edac.c:1037 knl_get_ha() warn: signedness bug returning '(-22)'
Both because the functions are declared to return a "u8", but try to
return -EINVAL for the error case.
Fix by returning 0xff (since the caller doesn't look at, or pass on, the
return value).
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Tony Luck <[email protected]>
Cc: Qiuxu Zhuo <[email protected]>
Cc: linux-edac <[email protected]>
Link: http://lkml.kernel.org/r/20180914201905.GA30946@agluck-desk
Signed-off-by: Borislav Petkov <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions