1 From 6916ef9742e45213d524b69700d937976098d1e6 Mon Sep 17 00:00:00 2001
2 From: John Crispin <blogic@openwrt.org>
3 Date: Tue, 15 Nov 2011 15:56:06 +0100
4 Subject: [PATCH 21/70] NET: MIPS: lantiq: return value of request_irq was not
7 The return values of request_irq() were not checked leading to the following
10 drivers/net/ethernet/lantiq_etop.c: In function 'ltq_etop_hw_init':
11 drivers/net/ethernet/lantiq_etop.c:368:15: warning: ignoring return value of 'request_irq', declared with attribute warn_unused_result
12 drivers/net/ethernet/lantiq_etop.c:377:15: warning: ignoring return value of 'request_irq', declared with attribute warn_unused_result
14 Signed-off-by: John Crispin <blogic@openwrt.org>
15 Cc: netdev@vger.kernel.org
17 drivers/net/ethernet/lantiq_etop.c | 14 ++++++++------
18 1 files changed, 8 insertions(+), 6 deletions(-)
20 diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c
21 index 9fd6779..dddb9fe 100644
22 --- a/drivers/net/ethernet/lantiq_etop.c
23 +++ b/drivers/net/ethernet/lantiq_etop.c
24 @@ -312,6 +312,7 @@ ltq_etop_hw_init(struct net_device *dev)
26 struct ltq_etop_priv *priv = netdev_priv(dev);
27 unsigned int mii_mode = priv->pldata->mii_mode;
31 ltq_pmu_enable(PMU_PPE);
32 @@ -356,7 +357,7 @@ ltq_etop_hw_init(struct net_device *dev)
34 ltq_dma_init_port(DMA_PORT_ETOP);
36 - for (i = 0; i < MAX_DMA_CHAN; i++) {
37 + for (i = 0; i < MAX_DMA_CHAN && !err; i++) {
38 int irq = LTQ_DMA_ETOP + i;
39 struct ltq_etop_chan *ch = &priv->ch[i];
41 @@ -364,21 +365,22 @@ ltq_etop_hw_init(struct net_device *dev)
44 ltq_dma_alloc_tx(&ch->dma);
45 - request_irq(irq, ltq_etop_dma_irq, IRQF_DISABLED,
46 + err = request_irq(irq, ltq_etop_dma_irq, IRQF_DISABLED,
48 } else if (IS_RX(i)) {
49 ltq_dma_alloc_rx(&ch->dma);
50 for (ch->dma.desc = 0; ch->dma.desc < LTQ_DESC_NUM;
52 if (ltq_etop_alloc_skb(ch))
56 - request_irq(irq, ltq_etop_dma_irq, IRQF_DISABLED,
57 + err = request_irq(irq, ltq_etop_dma_irq, IRQF_DISABLED,