net: fec: Do a sanity check on the gpio number
authorFabio Estevam <fabio.estevam@freescale.com>
Mon, 18 Feb 2013 10:20:31 +0000 (10:20 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 19 Feb 2013 05:51:09 +0000 (00:51 -0500)
commit07dcf8e9cc77e86eedfc28fa37713b5471e906b7
tree0bc1555b8ac4d8ff36bd6d036a39291a9c5a5f53
parenteb6b9a8cad65e820b145547844b108117cece3a0
net: fec: Do a sanity check on the gpio number

Check whether the phy-reset GPIO is valid, prior to requesting it.

In the case a board does not provide a phy-reset GPIO, just returns immediately.

With such gpio validation in place, it is also safe to change from pr_debug to
dev_err in the case the gpio request fails.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec.c