Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: fec: use managed function devm_gpio_request_one

Using gpio_request_one will require the probe fail-out call gpio_free,
which is missing currently. Change to use devm_gpio_request_one to
fix the problem.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Shawn Guo and committed by
David S. Miller
119fc007 5fa9c0fe

+2 -1
+2 -1
drivers/net/ethernet/freescale/fec.c
··· 1513 1513 return; 1514 1514 1515 1515 phy_reset = of_get_named_gpio(np, "phy-reset-gpios", 0); 1516 - err = gpio_request_one(phy_reset, GPIOF_OUT_INIT_LOW, "phy-reset"); 1516 + err = devm_gpio_request_one(&pdev->dev, phy_reset, 1517 + GPIOF_OUT_INIT_LOW, "phy-reset"); 1517 1518 if (err) { 1518 1519 pr_debug("FEC: failed to get gpio phy-reset: %d\n", err); 1519 1520 return;