platform/x86: hp-wmi: Convert simple_strtoul() to kstrtou32()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 15 May 2020 13:27:04 +0000 (16:27 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Jun 2020 07:31:11 +0000 (09:31 +0200)
commit176396ad0594cb20f0360676931504b7bf90ce67
treec0ce6c8535e04becf9f3300ee094ba47e9a1def1
parentb77412359c1e6b44b37365a11d0f434426783208
platform/x86: hp-wmi: Convert simple_strtoul() to kstrtou32()

[ Upstream commit 5cdc45ed3948042f0d73c6fec5ee9b59e637d0d2 ]

First of all, unsigned long can overflow u32 value on 64-bit machine.
Second, simple_strtoul() doesn't check for overflow in the input.

Convert simple_strtoul() to kstrtou32() to eliminate above issues.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/platform/x86/hp-wmi.c