Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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]>
- Loading branch information