diff options
author | John Crispin <blogic@openwrt.org> | 2012-04-16 12:31:48 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2012-04-16 12:31:48 +0000 |
commit | b9f03a5a14decfc1677b365842e8172bf7d6ec68 (patch) | |
tree | ea843226cf79615ad18e5b50255de68e0116d0c4 /target/linux/lantiq/patches-3.3/0017-NET-MIPS-lantiq-return-value-of-request_irq-was-not-.patch | |
parent | b9a5bae5fbd6e0a0fdb1c4c0aec0cd2bfd4c7503 (diff) | |
download | master-187ad058-b9f03a5a14decfc1677b365842e8172bf7d6ec68.tar.gz master-187ad058-b9f03a5a14decfc1677b365842e8172bf7d6ec68.tar.bz2 master-187ad058-b9f03a5a14decfc1677b365842e8172bf7d6ec68.zip |
[lantiq] adds 3.3 patches and files
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31307 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/lantiq/patches-3.3/0017-NET-MIPS-lantiq-return-value-of-request_irq-was-not-.patch')
-rw-r--r-- | target/linux/lantiq/patches-3.3/0017-NET-MIPS-lantiq-return-value-of-request_irq-was-not-.patch | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/target/linux/lantiq/patches-3.3/0017-NET-MIPS-lantiq-return-value-of-request_irq-was-not-.patch b/target/linux/lantiq/patches-3.3/0017-NET-MIPS-lantiq-return-value-of-request_irq-was-not-.patch new file mode 100644 index 0000000000..e3ef066c1e --- /dev/null +++ b/target/linux/lantiq/patches-3.3/0017-NET-MIPS-lantiq-return-value-of-request_irq-was-not-.patch @@ -0,0 +1,71 @@ +From 965d488202829699dd9d089adb4c8b605e9de6cd Mon Sep 17 00:00:00 2001 +From: John Crispin <blogic@openwrt.org> +Date: Tue, 15 Nov 2011 15:56:06 +0100 +Subject: [PATCH 17/70] NET: MIPS: lantiq: return value of request_irq was not + handled gracefully + +The return values of request_irq() were not checked leading to the following +error message. + +drivers/net/ethernet/lantiq_etop.c: In function 'ltq_etop_hw_init': +drivers/net/ethernet/lantiq_etop.c:368:15: warning: ignoring return value of 'request_irq', declared with attribute warn_unused_result +drivers/net/ethernet/lantiq_etop.c:377:15: warning: ignoring return value of 'request_irq', declared with attribute warn_unused_result + +Signed-off-by: John Crispin <blogic@openwrt.org> +Cc: netdev@vger.kernel.org +--- + drivers/net/ethernet/lantiq_etop.c | 14 ++++++++------ + 1 files changed, 8 insertions(+), 6 deletions(-) + +diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c +index 5a8ca89..daba994 100644 +--- a/drivers/net/ethernet/lantiq_etop.c ++++ b/drivers/net/ethernet/lantiq_etop.c +@@ -313,6 +313,7 @@ ltq_etop_hw_init(struct net_device *dev) + { + struct ltq_etop_priv *priv = netdev_priv(dev); + unsigned int mii_mode = priv->pldata->mii_mode; ++ int err = 0; + int i; + + ltq_pmu_enable(PMU_PPE); +@@ -357,7 +358,7 @@ ltq_etop_hw_init(struct net_device *dev) + + ltq_dma_init_port(DMA_PORT_ETOP); + +- for (i = 0; i < MAX_DMA_CHAN; i++) { ++ for (i = 0; i < MAX_DMA_CHAN && !err; i++) { + int irq = LTQ_DMA_ETOP + i; + struct ltq_etop_chan *ch = &priv->ch[i]; + +@@ -365,21 +366,22 @@ ltq_etop_hw_init(struct net_device *dev) + + if (IS_TX(i)) { + ltq_dma_alloc_tx(&ch->dma); +- request_irq(irq, ltq_etop_dma_irq, IRQF_DISABLED, ++ err = request_irq(irq, ltq_etop_dma_irq, IRQF_DISABLED, + "etop_tx", priv); + } else if (IS_RX(i)) { + ltq_dma_alloc_rx(&ch->dma); + for (ch->dma.desc = 0; ch->dma.desc < LTQ_DESC_NUM; + ch->dma.desc++) + if (ltq_etop_alloc_skb(ch)) +- return -ENOMEM; ++ err = -ENOMEM; + ch->dma.desc = 0; +- request_irq(irq, ltq_etop_dma_irq, IRQF_DISABLED, ++ err = request_irq(irq, ltq_etop_dma_irq, IRQF_DISABLED, + "etop_rx", priv); + } +- ch->dma.irq = irq; ++ if (!err) ++ ch->dma.irq = irq; + } +- return 0; ++ return err; + } + + static void +-- +1.7.9.1 + |