提交 7cefdd1f 编写于 作者: J Julia Lawall 提交者: David S. Miller

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/)

// <smpl>
@@
expression x,d;
@@

x = devm_kzalloc(...)
...
?-devm_kfree(d,x);
// </smpl>
Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 caa0bf64
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册