]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: surface3_power: Fix always true condition in mshw0011_space_handler()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 30 Mar 2020 10:26:50 +0000 (13:26 +0300)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 30 Mar 2020 10:26:50 +0000 (13:26 +0300)
commit3354643e7100df23958a5db32b491cc512f145e9
treebefd94c3b5474376ad279dc8f1c37f7c4a4228e5
parent446ff69348a8054f71cdecdb11b5cd675f78b3e4
platform/x86: surface3_power: Fix always true condition in mshw0011_space_handler()

smatch warnings:
.../surface3_power.c:417 mshw0011_space_handler() warn: always true condition '(ret >= 0) => +(0-u32max >= 0)'

Refactor error handling returned by mshw0011_adp_psr() to avoid always
true condition.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/surface3_power.c