diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2012-08-04 18:50:47 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-08-07 14:34:12 +0200 |
commit | 75c353ecacf54dbcca5e2e4388088893aac0fc34 (patch) | |
tree | 2d82c4a260a11e822303d033b07293d33bea52cb /drivers/pinctrl | |
parent | MAINTAINERS: fix a few pinctrl related entries (diff) | |
download | linux-75c353ecacf54dbcca5e2e4388088893aac0fc34.tar.xz linux-75c353ecacf54dbcca5e2e4388088893aac0fc34.zip |
drivers/pinctrl/pinctrl-nomadik.c: drop devm_kfree of devm_kzalloc'd data
devm_kfree should not have to be explicitly used.
The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression x,d;
@@
x = devm_kzalloc(...)
...
?-devm_kfree(d,x);
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/pinctrl-nomadik.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c index 53b0d49a7a1c..ec6ac501b23a 100644 --- a/drivers/pinctrl/pinctrl-nomadik.c +++ b/drivers/pinctrl/pinctrl-nomadik.c @@ -1731,7 +1731,6 @@ static int __devinit nmk_pinctrl_probe(struct platform_device *pdev) for (i = 0; i < npct->soc->gpio_num_ranges; i++) { if (!nmk_gpio_chips[i]) { dev_warn(&pdev->dev, "GPIO chip %d not registered yet\n", i); - devm_kfree(&pdev->dev, npct); return -EPROBE_DEFER; } npct->soc->gpio_ranges[i].gc = &nmk_gpio_chips[i]->chip; |