Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204901
b: refs/heads/master
c: cedb188
h: refs/heads/master
i:
  204899: 56d7da0
v: v3
  • Loading branch information
Anton Vorontsov authored and Grant Likely committed Jul 5, 2010
1 parent 56922ea commit 1fdd6d4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ac80a51e2ce5c431de9997085f33cb6093218b1f
refs/heads/master: cedb1881ba32f7e9cd49250bd79debccbe52b094
18 changes: 12 additions & 6 deletions trunk/drivers/gpio/gpiolib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1101,14 +1101,20 @@ int gpiochip_add(struct gpio_chip *chip)

unlock:
spin_unlock_irqrestore(&gpio_lock, flags);
if (status == 0)
status = gpiochip_export(chip);

if (status)
goto fail;

status = gpiochip_export(chip);
if (status)
goto fail;

return 0;
fail:
/* failures here can mean systems won't boot... */
if (status)
pr_err("gpiochip_add: gpios %d..%d (%s) failed to register\n",
chip->base, chip->base + chip->ngpio - 1,
chip->label ? : "generic");
pr_err("gpiochip_add: gpios %d..%d (%s) failed to register\n",
chip->base, chip->base + chip->ngpio - 1,
chip->label ? : "generic");
return status;
}
EXPORT_SYMBOL_GPL(gpiochip_add);
Expand Down

0 comments on commit 1fdd6d4

Please sign in to comment.