Browse Source

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: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Julia Lawall 13 năm trước cách đây
mục cha
commit
7cefdd1f55
1 tập tin đã thay đổi với 0 bổ sung1 xóa
  1. 0 1
      drivers/net/phy/mdio-mux-gpio.c

+ 0 - 1
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;
 }