]> www.infradead.org Git - users/dwmw2/linux.git/commit
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:32:52 +0000 (09:32 +0200)
commitf172e03d279bf93fe71b7b514a5b20eb6c6448ae
tree7951291f58137dcea23b59475f32315f1b5fe269
parent7639f010085735605e8faab1238f1b0fec0a2a7d
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