Re: [PATCH 0/5] gpio: aggregator: Fix Smatch warnings

From: Koichiro Den
Date: Sat Apr 12 2025 - 10:45:40 EST


On Sat, Apr 12, 2025 at 01:14:53PM GMT, Dan Carpenter wrote:
> Fix some static checker warnings from Smatch:
> https://github.com/error27/smatch
>
> Dan Carpenter (5):
> gpio: aggregator: fix "_sysfs" prefix check in
> gpio_aggregator_make_group()
> gpio: aggregator: Fix gpio_aggregator_line_alloc() checking
> gpio: aggregator: Return an error if there are no GPIOs in
> gpio_aggregator_parse()
> gpio: aggregator: Fix error code in gpio_aggregator_activate()
> gpio: aggregator: Fix leak in gpio_aggregator_parse()
>
> drivers/gpio/gpio-aggregator.c | 21 ++++++++++++---------
> 1 file changed, 12 insertions(+), 9 deletions(-)

Thank you very much for spotting these issues. I doubt myself for having
overlooked these.. And I had actually forgotten to run Smatch (it's really
amazing tool). I also tested the patched module by running kselftest
(gpio-aggregator.sh), with the addition of a new test case for the issue
that your first patch uncovered. I'll submit a patch to add it to selftest
later.

Acked-by: Koichiro Den <koichiro.den@xxxxxxxxxxxxx>

Thanks,
Koichiro Den

>
> --
> 2.47.2
>