Skip to content

Commit

Permalink
drivers/net/phy/mdio-mux-gpio.c: drop devm_kfree of devm_kzalloc'd data
Browse files Browse the repository at this point in the history
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: David S. Miller <davem@davemloft.net>
  • Loading branch information
Julia Lawall authored and David S. Miller committed Aug 6, 2012
1 parent caa0bf6 commit 7cefdd1
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/net/phy/mdio-mux-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ static int __devinit mdio_mux_gpio_probe(struct platform_device *pdev)
n--;
gpio_free(s->gpio[n]);
}
devm_kfree(&pdev->dev, s);
return r;
}

Expand Down

0 comments on commit 7cefdd1

Please sign in to comment.