netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Francois Romieu <romieu@fr.zoreil.com>
To: Carl-Daniel Hailfinger <c-d.hailfinger.kernel.2004@gmx.net>
Cc: marcelo.tosatti@cyclades.com,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	netdev@oss.sgi.com, Jeff Garzik <jgarzik@pobox.com>,
	Manfred Spraul <manfred@colorfullife.com>
Subject: Re: [PATCH] [2.4] forcedeth network driver
Date: Sat, 24 Jan 2004 19:59:51 +0100	[thread overview]
Message-ID: <20040124195951.A1304@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <4012A738.2060009@gmx.net>; from c-d.hailfinger.kernel.2004@gmx.net on Sat, Jan 24, 2004 at 06:11:20PM +0100

Carl-Daniel Hailfinger <c-d.hailfinger.kernel.2004@gmx.net> :
[current version of forcedeth]

+static int __devinit probe_nic(struct pci_dev *pci_dev, const struct pci_device_id *id)
+{
[...]
+       dev = alloc_etherdev(sizeof(struct fe_priv));
+       np = get_nvpriv(dev);
+       err = -ENOMEM;
+       if (!dev)
+               goto out;

-> get_npriv() can still dereference a NULL pointer.

[...]
+       err = pci_request_regions(pci_dev, dev->name);
+       if (err < 0)
+               goto out_disable;
[...]
+       if (i == DEVICE_COUNT_RESOURCE) {
+               printk(KERN_INFO "forcedeth: Couldn't find register window for device %s.\n",
+                                       pci_name(pci_dev));
+               goto out_relreg;
[...]
+       if (!dev->base_addr)
+               goto out_disable;
                     ^^^^^^^^^^^
-> shouldn't it be out_relreg ?

--
Ueimor

  parent reply	other threads:[~2004-01-24 18:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-24 17:11 [PATCH] [2.4] forcedeth network driver Carl-Daniel Hailfinger
2004-01-24 17:58 ` Jeff Garzik
2004-01-24 21:24   ` Carl-Daniel Hailfinger
2004-01-25  0:01     ` Jeff Garzik
2004-01-24 18:59 ` Francois Romieu [this message]
2004-01-24 19:02   ` Manfred Spraul
     [not found] <4012BF44.9@colorfullife.com>
2004-01-24 20:21 ` Jeff Garzik
2004-01-24 21:55   ` Carl-Daniel Hailfinger
2004-01-24 23:57     ` Jeff Garzik
2004-01-24 22:05   ` Vojtech Pavlik
2004-01-24 22:33     ` Carl-Daniel Hailfinger
2004-01-24 22:46       ` Vojtech Pavlik
2004-01-24 23:11         ` Paul Mackerras
2004-01-27 13:30   ` Rask Ingemann Lambertsen
  -- strict thread matches above, loose matches on Subject: below --
2004-02-05  0:52 Carl-Daniel Hailfinger
2004-02-05  9:45 ` Jeff Garzik

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=20040124195951.A1304@electric-eye.fr.zoreil.com \
    --to=romieu@fr.zoreil.com \
    --cc=c-d.hailfinger.kernel.2004@gmx.net \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    --cc=marcelo.tosatti@cyclades.com \
    --cc=netdev@oss.sgi.com \
    /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).