linux-mips
[Top] [All Lists]

Re: [PATCH 3/3] NET: MIPS: lantiq: return value of request_irq was not h

To: John Crispin <blogic@openwrt.org>
Subject: Re: [PATCH 3/3] NET: MIPS: lantiq: return value of request_irq was not handled gracefully
From: Sergei Shtylyov <sshtylyov@mvista.com>
Date: Fri, 18 Nov 2011 12:52:00 +0400
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
In-reply-to: <1321548165-22563-3-git-send-email-blogic@openwrt.org>
References: <1321548165-22563-1-git-send-email-blogic@openwrt.org> <1321548165-22563-3-git-send-email-blogic@openwrt.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0
Hello.

On 17-11-2011 20:42, John Crispin wrote:

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>
Acked-by: David S. Miller<davem@davemloft.net>
---
  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 9fd6779..dddb9fe 100644
--- a/drivers/net/ethernet/lantiq_etop.c
+++ b/drivers/net/ethernet/lantiq_etop.c
[...]
@@ -364,21 +365,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,

   BTW, IRQF_DISABLED is a nop now, so could have dropped it...

                                "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,

   Same here.

WBR, Sergei

<Prev in Thread] Current Thread [Next in Thread>