Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328455
b: refs/heads/master
c: 72eac30
h: refs/heads/master
i:
  328453: 8be59c9
  328451: 5f509ff
  328447: b003e5e
v: v3
  • Loading branch information
Maxime Ripard authored and Linus Walleij committed Sep 7, 2012
1 parent afa7253 commit 675bd7b
Show file tree
Hide file tree
Showing 2 changed files with 4 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: ab3b8782618c046386b85ada5e0e789212f17cf8
refs/heads/master: 72eac3020de35a2c3fd0d39a26399989a0a9392e
8 changes: 3 additions & 5 deletions trunk/drivers/gpio/gpio-74x164.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ static int __devinit gen_74x164_probe(struct spi_device *spi)
if (ret < 0)
return ret;

chip = kzalloc(sizeof(*chip), GFP_KERNEL);
chip = devm_kzalloc(&spi->dev, sizeof(*chip), GFP_KERNEL);
if (!chip)
return -ENOMEM;

Expand Down Expand Up @@ -125,7 +125,6 @@ static int __devinit gen_74x164_probe(struct spi_device *spi)
exit_destroy:
dev_set_drvdata(&spi->dev, NULL);
mutex_destroy(&chip->lock);
kfree(chip);
return ret;
}

Expand All @@ -141,10 +140,9 @@ static int __devexit gen_74x164_remove(struct spi_device *spi)
dev_set_drvdata(&spi->dev, NULL);

ret = gpiochip_remove(&chip->gpio_chip);
if (!ret) {
if (!ret)
mutex_destroy(&chip->lock);
kfree(chip);
} else
else
dev_err(&spi->dev, "Failed to remove the GPIO controller: %d\n",
ret);

Expand Down

0 comments on commit 675bd7b

Please sign in to comment.