Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 336437
b: refs/heads/master
c: b4d4b1f
h: refs/heads/master
i:
  336435: 39a83b2
v: v3
  • Loading branch information
Axel Lin authored and Linus Walleij committed Nov 21, 2012
1 parent 269ee86 commit d1c3cfd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 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: 316511c0134acec8f4ea730bd1897c7a1124a7c1
refs/heads/master: b4d4b1f087b9d4d730eb70f24032395d7cd7e591
4 changes: 3 additions & 1 deletion trunk/drivers/gpio/gpiolib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1201,6 +1201,7 @@ int gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
unsigned int npins)
{
struct gpio_pin_range *pin_range;
int ret;

pin_range = kzalloc(sizeof(*pin_range), GFP_KERNEL);
if (!pin_range) {
Expand All @@ -1219,10 +1220,11 @@ int gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
pin_range->pctldev = pinctrl_find_and_add_gpio_range(pinctl_name,
&pin_range->range);
if (IS_ERR(pin_range->pctldev)) {
ret = PTR_ERR(pin_range->pctldev);
pr_err("%s: GPIO chip: could not create pin range\n",
chip->label);
kfree(pin_range);
return PTR_ERR(pin_range->pctldev);
return ret;
}
pr_debug("GPIO chip %s: created GPIO range %d->%d ==> %s PIN %d->%d\n",
chip->label, gpio_offset, gpio_offset + npins - 1,
Expand Down

0 comments on commit d1c3cfd

Please sign in to comment.