gpio: aggregator: Fix error code in gpio_aggregator_activate()
Propagate the error code if gpio_aggregator_make_device_sw_node() fails.
Don't return success.
Fixes: 86f162e73d ("gpio: aggregator: introduce basic configfs interface")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Acked-by: Koichiro Den <koichiro.den@canonical.com>
Link: https://lore.kernel.org/r/79b804a0769a434698616bebedacc0e5d5605fdc.1744452787.git.dan.carpenter@linaro.org
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
This commit is contained in:
committed by
Bartosz Golaszewski
parent
db1baf69e5
commit
05b43de95a
@@ -626,8 +626,10 @@ static int gpio_aggregator_activate(struct gpio_aggregator *aggr)
|
||||
return -ENOMEM;
|
||||
|
||||
swnode = gpio_aggregator_make_device_sw_node(aggr);
|
||||
if (IS_ERR(swnode))
|
||||
if (IS_ERR(swnode)) {
|
||||
ret = PTR_ERR(swnode);
|
||||
goto err_remove_lookups;
|
||||
}
|
||||
|
||||
memset(&pdevinfo, 0, sizeof(pdevinfo));
|
||||
pdevinfo.name = DRV_NAME;
|
||||
|
||||
Reference in New Issue
Block a user