aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-aggregator.c
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2025-04-12 10:15:16 +0000
committerBartosz Golaszewski <[email protected]>2025-04-14 20:25:20 +0000
commitdb1baf69e563fc222a75c0add5c76f437c717ac0 (patch)
treed5287777daaccc47188d8a1be9bbbd9d03ecc41d /drivers/gpio/gpio-aggregator.c
parentgpio: aggregator: Fix gpio_aggregator_line_alloc() checking (diff)
downloadkernel-db1baf69e563fc222a75c0add5c76f437c717ac0.tar.gz
kernel-db1baf69e563fc222a75c0add5c76f437c717ac0.zip
gpio: aggregator: Return an error if there are no GPIOs in gpio_aggregator_parse()
The error handling in gpio_aggregator_parse() was re-written. It now returns success if there are no GPIOs. Restore the previous behavior and return -EINVAL instead. Fixes: 83c8e3df642f ("gpio: aggregator: expose aggregator created via legacy sysfs to configfs") Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Koichiro Den <[email protected]> Link: https://lore.kernel.org/r/9dcd5fda7a3819e896d9eee4156e7c46c9a64595.1744452787.git.dan.carpenter@linaro.org Signed-off-by: Bartosz Golaszewski <[email protected]>
Diffstat (limited to 'drivers/gpio/gpio-aggregator.c')
-rw-r--r--drivers/gpio/gpio-aggregator.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-aggregator.c b/drivers/gpio/gpio-aggregator.c
index e1b2efc0df99..62bb50af7cda 100644
--- a/drivers/gpio/gpio-aggregator.c
+++ b/drivers/gpio/gpio-aggregator.c
@@ -1128,6 +1128,7 @@ static int gpio_aggregator_parse(struct gpio_aggregator *aggr)
if (!n) {
pr_err("No GPIOs specified\n");
+ error = -EINVAL;
goto err;
}