EDAC, sb_edac.c: Fix signedness bugs in *_get_ha() functions.
Quoted 8 lines · Tony
A static checker gave the following warnings:
drivers/edac/sb_edac.c:1030ibridge_get_ha()warn: signedness bug returning '(-22)'drivers/edac/sb_edac.c:1037knl_get_ha()warn: signedness bug returning '(-22)'Both because the functions are declared to return a "u8", but try to return
-EINVALfor the error case.
Quoted 8 lines
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]>--- drivers/edac/sb_edac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Applied,
thanks.