Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e4339ce3 authored by Johan Hovold's avatar Johan Hovold Committed by Linus Walleij
Browse files

gpio: sysfs: clean up edge_store



Remove goto from success path.

Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
Reviewed-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 2ec74a95
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -238,12 +238,14 @@ static ssize_t edge_store(struct device *dev,
	ssize_t	status = size;
	int i;

	for (i = 0; i < ARRAY_SIZE(trigger_types); i++)
	for (i = 0; i < ARRAY_SIZE(trigger_types); i++) {
		if (sysfs_streq(trigger_types[i].name, buf))
			goto found;
			break;
	}

	if (i == ARRAY_SIZE(trigger_types))
		return -EINVAL;

found:
	flags = trigger_types[i].flags;

	mutex_lock(&sysfs_lock);