From: Julia Lawall Date: Sat, 4 Aug 2012 06:50:49 +0000 (+0000) Subject: drivers/net/phy/mdio-mux-gpio.c: drop devm_kfree of devm_kzalloc'd data X-Git-Tag: MMI-PSA29.97-13-9~16158^2~8 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7cefdd1f55ec075f1f2da0a321495d5a8262ffaa;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git drivers/net/phy/mdio-mux-gpio.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/) // @@ expression x,d; @@ x = devm_kzalloc(...) ... ?-devm_kfree(d,x); // Signed-off-by: Julia Lawall Signed-off-by: David S. Miller --- diff --git a/drivers/net/phy/mdio-mux-gpio.c b/drivers/net/phy/mdio-mux-gpio.c index e0cc4ef33dee..eefe49e8713c 100644 --- a/drivers/net/phy/mdio-mux-gpio.c +++ b/drivers/net/phy/mdio-mux-gpio.c @@ -101,7 +101,6 @@ err: n--; gpio_free(s->gpio[n]); } - devm_kfree(&pdev->dev, s); return r; }