diff options
author | Xi Pardee <xi.pardee@linux.intel.com> | 2024-06-24 23:32:15 +0300 |
---|---|---|
committer | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2024-07-08 10:43:46 +0300 |
commit | 97eb32b0ff3917ab4ec2745aafc318042c95e4a7 (patch) | |
tree | 9aee61b0c745d13c5abec83abda85f981768b795 /drivers/platform/x86 | |
parent | 438aef8270579d4f8dee976709f015deb084e665 (diff) | |
download | linux-97eb32b0ff3917ab4ec2745aafc318042c95e4a7.tar.xz |
platform/x86:intel/pmc: Remove unneeded min_t check
min_t() check is not needed in pmc_core_ltr_ignore_write().
kstrtox() has a built-in overflow check.
Signed-off-by: Xi Pardee <xi.pardee@linux.intel.com>
Link: https://lore.kernel.org/r/20240624203218.2428475-7-xi.pardee@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'drivers/platform/x86')
-rw-r--r-- | drivers/platform/x86/intel/pmc/core.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/platform/x86/intel/pmc/core.c b/drivers/platform/x86/intel/pmc/core.c index c15163409e95..89db5b1a6551 100644 --- a/drivers/platform/x86/intel/pmc/core.c +++ b/drivers/platform/x86/intel/pmc/core.c @@ -513,12 +513,10 @@ static ssize_t pmc_core_ltr_ignore_write(struct file *file, { struct seq_file *s = file->private_data; struct pmc_dev *pmcdev = s->private; - u32 buf_size, value; + u32 value; int err; - buf_size = min_t(u32, count, 64); - - err = kstrtou32_from_user(userbuf, buf_size, 10, &value); + err = kstrtou32_from_user(userbuf, count, 10, &value); if (err) return err; |