]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sh: intc: Replace simple_strtoul() with kstrtoul()
authorHongbo Li <lihongbo22@huawei.com>
Mon, 2 Sep 2024 02:45:34 +0000 (10:45 +0800)
committerJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Thu, 26 Sep 2024 15:25:29 +0000 (17:25 +0200)
commitc3e878ca7b6663d2ad77a6e17460fc47a2347f4a
tree51f43aa06953678b00c2d5cb0ce916f3c98ceef8
parent977fae6d611764d41de19b9ba01699b1618148f7
sh: intc: Replace simple_strtoul() with kstrtoul()

The function simple_strtoul() performs no error checking
in scenarios where the input value overflows the intended
output variable.

We can replace the use of simple_strtoul() with the safer
alternative kstrtoul(). This also allows us to print an
error message in case of failure.

Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
drivers/sh/intc/userimask.c