提交 e4339ce3 编写于 作者: J Johan Hovold 提交者: Linus Walleij

gpio: sysfs: clean up edge_store

Remove goto from success path.
Signed-off-by: NJohan Hovold <johan@kernel.org>
Reviewed-by: NAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 2ec74a95
......@@ -236,14 +236,16 @@ static ssize_t edge_store(struct device *dev,
struct gpio_desc *desc = data->desc;
unsigned long flags;
ssize_t status = size;
int i;
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;
return -EINVAL;
break;
}
if (i == ARRAY_SIZE(trigger_types))
return -EINVAL;
found:
flags = trigger_types[i].flags;
mutex_lock(&sysfs_lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册