summaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2021-04-19 16:31:09 +0200
committerHans de Goede <hdegoede@redhat.com>2021-04-20 17:01:48 +0200
commitdd5566d6d80c2d9936f8b8b36a7a9599cbfe47a7 (patch)
tree4b9194fdfef80a8f95f0b46fb054a95cb5f17803 /drivers/platform
parentplatform/x86: touchscreen_dmi: Add info for the Teclast Tbook 11 tablet (diff)
downloadlinux-dd5566d6d80c2d9936f8b8b36a7a9599cbfe47a7.tar.xz
linux-dd5566d6d80c2d9936f8b8b36a7a9599cbfe47a7.zip
platform/x86: intel_pmc_core: Fix "unsigned 'ret' is never less than zero" smatch warning
Change the type of ret form a size_t to a ssize_t, matching the prototype of simple_write_to_buffer(), fixing this warning reported by smatch: drivers/platform/x86/intel_pmc_core.c:1369 pmc_core_lpm_latch_mode_write() warn: unsigned 'ret' is never less than zero. Fixes: 8074a79fad2e ("platform/x86: intel_pmc_core: Add option to set/clear LPM mode") Cc: David E. Box <david.e.box@linux.intel.com> Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20210419143109.30612-1-hdegoede@redhat.com
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/intel_pmc_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/intel_pmc_core.c b/drivers/platform/x86/intel_pmc_core.c
index 3ae00ac85c75..d174aeb492e0 100644
--- a/drivers/platform/x86/intel_pmc_core.c
+++ b/drivers/platform/x86/intel_pmc_core.c
@@ -1360,7 +1360,7 @@ static ssize_t pmc_core_lpm_latch_mode_write(struct file *file,
struct pmc_dev *pmcdev = s->private;
bool clear = false, c10 = false;
unsigned char buf[8];
- size_t ret;
+ ssize_t ret;
int idx, m, mode;
u32 reg;