kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darren Jenkins\\" <darrenrjenkins@gmail.com>
To: kernel-janitors@vger.kernel.org
Subject: [KJ][Patch][update] check return value of request_irq in pcnet_cs.c
Date: Fri, 24 Mar 2006 12:02:08 +0000	[thread overview]
Message-ID: <1143201728.8559.5.camel@localhost.localdomain> (raw)
In-Reply-To: <1141198185.7784.9.camel@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 936 bytes --]

G'day list

Here is an updated patch that will apply to a clean tree.
The only difference between it and the last patch is, it is against the
correctly named file.

This patch is compile tested.


pcnet_cs.c called request_irq without checking its return value @ line
1036.

The patch below just checks the return value and returns -EBUSY on
failure.

Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com>

--- linux-2.6.16-git8/drivers/net/pcmcia/pcnet_cs.c.orig	2006-03-21 23:42:54.000000000 +1100
+++ linux-2.6.16-git8/drivers/net/pcmcia/pcnet_cs.c	2006-03-24 21:01:15.000000000 +1100
@@ -1033,7 +1033,8 @@ static int pcnet_open(struct net_device 
     link->open++;
 
     set_misc_reg(dev);
-    request_irq(dev->irq, ei_irq_wrapper, SA_SHIRQ, dev_info, dev);
+    if (request_irq(dev->irq, ei_irq_wrapper, SA_SHIRQ, dev_info, dev) < 0)
+    	return -EBUSY;
 
     info->phy_id = info->eth_phy;
     info->link_status = 0x00;



[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

      parent reply	other threads:[~2006-03-24 12:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-01  7:29 [KJ][Patch][update] check return value of request_region in Darren Jenkins\
2006-03-01  8:07 ` Tim Cooijmans
2006-03-24 12:02 ` Darren Jenkins\ [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1143201728.8559.5.camel@localhost.localdomain \
    --to=darrenrjenkins@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).