mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2026-01-25 12:27:20 +00:00
platform/x86: intel_pmc_ipc: Propagate error from kstrtoul()
kstrtoul() already returns negative error if the input was not valid so return it directly. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
This commit is contained in:
parent
1e3872ccda
commit
fc07ac6449
@ -512,8 +512,9 @@ static ssize_t intel_pmc_ipc_northpeak_store(struct device *dev,
|
||||
int subcmd;
|
||||
int ret;
|
||||
|
||||
if (kstrtoul(buf, 0, &val))
|
||||
return -EINVAL;
|
||||
ret = kstrtoul(buf, 0, &val);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (val)
|
||||
subcmd = 1;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user