Re: [PATCH 1/2] regulator: s2mps11: drop redundant sanity checks in s2mpg10_of_parse_cb()
From: André Draszik
Date: Tue Feb 10 2026 - 06:34:44 EST
On Tue, 2026-02-10 at 11:51 +0100, Krzysztof Kozlowski wrote:
> On 10/02/2026 10:37, André Draszik wrote:
> > Hi Krzysztof,
> >
> > On Tue, 2026-02-10 at 08:28 +0100, Krzysztof Kozlowski wrote:
> >
> >
> > > I also wonder why you left the second - ext_control_s2mpg11 - untouched.
> >
> > Could you point me to it please? I'm not sure I see what you mean.
>
> There is exact same line, which you touch here, ~20 lines below. At
> least in linux-next from 5th Feb.
So you mean
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/regulator/s2mps11.c#n506
? It is part of the patch:
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index 2d5510acd0780ab6f9296c48ddcde5efe15ff488..2d67c5c16f487506a2e9e4b119f33faa846269f7 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -478,8 +478,6 @@ static int s2mpg10_of_parse_cb(struct device_node *np,
return -EINVAL;
}
- if (ext_control > ARRAY_SIZE(ext_control_s2mpg10))
- return -EINVAL;
ext_control = ext_control_s2mpg10[ext_control];
break;
@@ -503,8 +501,6 @@ static int s2mpg10_of_parse_cb(struct device_node *np,
return -EINVAL;
}
- if (ext_control > ARRAY_SIZE(ext_control_s2mpg11))
- return -EINVAL;
ext_control = ext_control_s2mpg11[ext_control];
break;
Otherwise I still don't see it :-)
Cheers,
Andre'