aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
diff options
context:
space:
mode:
authorChen-Yu Tsai <wens@csie.org>2014-05-29 10:31:40 -0400
committerDavid S. Miller <davem@davemloft.net>2014-06-02 17:04:06 -0400
commitd7ec858413612ebb53c539541d6a0c7927db0bcd (patch)
treed68db9879024e6bc4d97a3e2586629415c9e684b /drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
parent31595de219e8a1a2ed7aeccbe4f18e44f2d2db00 (diff)
net: stmmac: Handle different error codes from platform_get_irq_byname
The following patch moved device tree interrupt resolution into platform_get_irq_byname: ad69674 of/irq: do irq resolution in platform_get_irq_byname() As a result, the function no longer only return -ENXIO on error. This breaks DT based probing of stmmac, as seen in test runs of linux-next next-20140526 cubie2-sunxi_defconfig: http://lists.linaro.org/pipermail/kernel-build-reports/2014-May/003659.html This patch makes the stmmac_platform probe function properly handle error codes, such as returning for deferred probing, and other codes returned by of_irq_get_by_name. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac_main.c')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 110ca1c766d6..057a1208e594 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -1753,7 +1753,7 @@ static int stmmac_open(struct net_device *dev)
1753 } 1753 }
1754 1754
1755 /* Request the IRQ lines */ 1755 /* Request the IRQ lines */
1756 if (priv->lpi_irq != -ENXIO) { 1756 if (priv->lpi_irq > 0) {
1757 ret = request_irq(priv->lpi_irq, stmmac_interrupt, IRQF_SHARED, 1757 ret = request_irq(priv->lpi_irq, stmmac_interrupt, IRQF_SHARED,
1758 dev->name, dev); 1758 dev->name, dev);
1759 if (unlikely(ret < 0)) { 1759 if (unlikely(ret < 0)) {
@@ -1813,7 +1813,7 @@ static int stmmac_release(struct net_device *dev)
1813 free_irq(dev->irq, dev); 1813 free_irq(dev->irq, dev);
1814 if (priv->wol_irq != dev->irq) 1814 if (priv->wol_irq != dev->irq)
1815 free_irq(priv->wol_irq, dev); 1815 free_irq(priv->wol_irq, dev);
1816 if (priv->lpi_irq != -ENXIO) 1816 if (priv->lpi_irq > 0)
1817 free_irq(priv->lpi_irq, dev); 1817 free_irq(priv->lpi_irq, dev);
1818 1818
1819 /* Stop TX/RX DMA and clear the descriptors */ 1819 /* Stop TX/RX DMA and clear the descriptors */