]> git.ipfire.org Git - thirdparty/linux.git/commit
gpio: aggregator: fix "_sysfs" prefix check in gpio_aggregator_make_group()
authorDan Carpenter <dan.carpenter@linaro.org>
Sat, 12 Apr 2025 10:15:00 +0000 (13:15 +0300)
committerBartosz Golaszewski <brgl@bgdev.pl>
Mon, 14 Apr 2025 20:25:20 +0000 (22:25 +0200)
commiteebfcb98cdc0228f5e1b7407f9db1c602bd8e545
tree86e4e1462512d44954b1bf1f7abfbbbfacd67cd2
parent6d7f0c1103ef3935eb3f302d09af4ef9e85212a3
gpio: aggregator: fix "_sysfs" prefix check in gpio_aggregator_make_group()

This code is intended to reject strings that start with "_sysfs" but the
strcmp() limit is wrong so checks the whole string instead of the prefix.

Fixes: 83c8e3df642f ("gpio: aggregator: expose aggregator created via legacy sysfs to configfs")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Koichiro Den <koichiro.den@canonical.com>
Link: https://lore.kernel.org/r/30210ed77b40b4b6629de659cb56b9ec7832c447.1744452787.git.dan.carpenter@linaro.org
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
drivers/gpio/gpio-aggregator.c