mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
gpio: sysfs: clean up edge_store
Remove goto from success path. Signed-off-by: Johan Hovold <[email protected]> Reviewed-by: Alexandre Courbot <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
parent
2ec74a9593
commit
e4339ce323
1 changed files with 7 additions and 5 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue