summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-09-27 10:10:21 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2024-09-27 10:10:21 -0700
commitec38498450a96a8d85f0409d9e4a41415cde9c1d (patch)
treebf81025267154cf00a56cef414fbe695faddca73 /drivers
parent653608c67ae3dce1c5dee8c620ce6016e174bbd1 (diff)
parentc3e878ca7b6663d2ad77a6e17460fc47a2347f4a (diff)
downloadlwn-ec38498450a96a8d85f0409d9e4a41415cde9c1d.tar.gz
lwn-ec38498450a96a8d85f0409d9e4a41415cde9c1d.zip
Merge tag 'sh-for-v6.12-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux
Pull sh updates from John Paul Adrian Glaubitz: "The first change by Gaosheng Cui removes unused declarations which have been obsoleted since commit 5a4053b23262 ("sh: Kill off dead boards.") and the second by his colleague Hongbo Li replaces the use of the unsafe simple_strtoul() with the safer kstrtoul() function in the sh interrupt controller driver code" * tag 'sh-for-v6.12-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux: sh: intc: Replace simple_strtoul() with kstrtoul() sh: Remove unused declarations for make_maskreg_irq() and irq_mask_register
Diffstat (limited to 'drivers')
-rw-r--r--drivers/sh/intc/userimask.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/sh/intc/userimask.c b/drivers/sh/intc/userimask.c
index abe9091827cd..a363f77881d1 100644
--- a/drivers/sh/intc/userimask.c
+++ b/drivers/sh/intc/userimask.c
@@ -32,8 +32,11 @@ store_intc_userimask(struct device *dev,
const char *buf, size_t count)
{
unsigned long level;
+ int ret;
- level = simple_strtoul(buf, NULL, 10);
+ ret = kstrtoul(buf, 10, &level);
+ if (ret != 0)
+ return ret;
/*
* Minimal acceptable IRQ levels are in the 2 - 16 range, but