Messages in this thread | | | Date | Sat, 24 Jan 2004 19:59:51 +0100 | From | Francois Romieu <> | Subject | Re: [PATCH] [2.4] forcedeth network driver |
| |
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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |