Skip to content
Commit 6060a75e authored by Tom Rix's avatar Tom Rix Committed by Hans de Goede
Browse files

platform/x86: thinkpad_acpi: consistently check fan_get_status return.



Clang static analysis returns this false positive
thinkpad_acpi.c:8926:19: warning: The left operand
  of '!=' is a garbage value
  (status != 0) ? "enabled" : "disabled", status);
   ~~~~~~ ^

The return of fan_get_status* is checked inconsistenly.
Sometime ret < 0 is an error, sometimes !ret.
Both fan_get_status() and fan_get_status_safe() return
0 on success and return negative otherwise.  Change
the checks for error, ret < 0, into checks for
not success, !ret.

Signed-off-by: default avatarTom Rix <trix@redhat.com>
Link: https://lore.kernel.org/r/20220312145327.1398510-1-trix@redhat.com


Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent 286e937e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment