Commit 05b43de9 authored by Dan Carpenter's avatar Dan Carpenter Committed by Bartosz Golaszewski
Browse files

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: 86f162e7 ("gpio: aggregator: introduce basic configfs interface")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Acked-by: default avatarKoichiro Den <koichiro.den@canonical.com>
Link: https://lore.kernel.org/r/79b804a0769a434698616bebedacc0e5d5605fdc.1744452787.git.dan.carpenter@linaro.org


Signed-off-by: default avatarBartosz Golaszewski <brgl@bgdev.pl>
parent db1baf69
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;