Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 373623
b: refs/heads/master
c: f39f54a
h: refs/heads/master
i:
  373621: 8f8cdd9
  373619: fe35020
  373615: 1609e98
v: v3
  • Loading branch information
Jingoo Han authored and Linus Walleij committed Mar 27, 2013
1 parent e610aea commit 753ff33
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 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: 632d8e55d1f0304579315669bfadcab7352973fd
refs/heads/master: f39f54af032ce900815d0d718df5f1717eed50fe
7 changes: 2 additions & 5 deletions trunk/drivers/gpio/gpio-pcf857x.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ static int pcf857x_probe(struct i2c_client *client,
}

/* Allocate, initialize, and register this gpio_chip. */
gpio = kzalloc(sizeof *gpio, GFP_KERNEL);
gpio = devm_kzalloc(&client->dev, sizeof(*gpio), GFP_KERNEL);
if (!gpio)
return -ENOMEM;

Expand Down Expand Up @@ -391,7 +391,6 @@ static int pcf857x_probe(struct i2c_client *client,
if (pdata && client->irq)
pcf857x_irq_domain_cleanup(gpio);

kfree(gpio);
return status;
}

Expand All @@ -416,9 +415,7 @@ static int pcf857x_remove(struct i2c_client *client)
pcf857x_irq_domain_cleanup(gpio);

status = gpiochip_remove(&gpio->chip);
if (status == 0)
kfree(gpio);
else
if (status)
dev_err(&client->dev, "%s --> %d\n", "remove", status);
return status;
}
Expand Down

0 comments on commit 753ff33

Please sign in to comment.