summaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
authorTom Rix <trix@redhat.com>2022-03-12 17:53:27 +0300
committerHans de Goede <hdegoede@redhat.com>2022-03-17 21:47:24 +0300
commit6060a75e77fb05c9d54ed41cccc496dd98054b57 (patch)
treea6518b60ccd49c2c7b037293a3ce673a13c894e5 /drivers/acpi
parent286e937efbc7177c114e80aae9b402131e3886c1 (diff)
downloadlinux-6060a75e77fb05c9d54ed41cccc496dd98054b57.tar.xz
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: Tom Rix <trix@redhat.com> Link: https://lore.kernel.org/r/20220312145327.1398510-1-trix@redhat.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/acpi')
0 files changed, 0 insertions, 0 deletions