netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: eepro testing positive EBUSY return by request_irq()?
@ 2010-12-31 14:47 roel kluin
  2010-12-31 15:27 ` Ben Hutchings
  0 siblings, 1 reply; 5+ messages in thread
From: roel kluin @ 2010-12-31 14:47 UTC (permalink / raw)
  To: davem, netdev, Andrew Morton, LKML

Fix -EBUSY test for request_irq().

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
 drivers/net/eepro.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

I just found this in the code, no bug was observed. Is this patch needed? the test
for an -EBUSY return by request_irq() occurs much more frequently in kernel code.

diff --git a/drivers/net/eepro.c b/drivers/net/eepro.c
index 7c82631..47cfecb 100644
--- a/drivers/net/eepro.c
+++ b/drivers/net/eepro.c
@@ -920,7 +920,7 @@ static int	eepro_grab_irq(struct net_device *dev)
 
 		eepro_sw2bank0(ioaddr); /* Switch back to Bank 0 */
 
-		if (request_irq (*irqp, NULL, IRQF_SHARED, "bogus", dev) != EBUSY) {
+		if (request_irq (*irqp, NULL, IRQF_SHARED, "bogus", dev) != -EBUSY) {
 			unsigned long irq_mask;
 			/* Twinkle the interrupt, and check if it's seen */
 			irq_mask = probe_irq_on();

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-01-03 19:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-31 14:47 [PATCH] net: eepro testing positive EBUSY return by request_irq()? roel kluin
2010-12-31 15:27 ` Ben Hutchings
2011-01-02 14:52   ` roel kluin
2011-01-02 19:51     ` Ben Hutchings
2011-01-03 19:37     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).