summaryrefslogtreecommitdiffstats
path: root/drivers/net/tokenring
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-06-21 16:17:17 +0200
committerJeff Garzik <jeff@garzik.org>2006-06-22 23:24:18 -0400
commit6d56ab936237b429366ade0d2a1540c7e41beb87 (patch)
tree6e767fd02c7c43aa72d600bdb5057c14dd05d56f /drivers/net/tokenring
parenta192491ad58098f2c57d2d1efe721ea0634dc0aa (diff)
downloadop-kernel-dev-6d56ab936237b429366ade0d2a1540c7e41beb87.zip
op-kernel-dev-6d56ab936237b429366ade0d2a1540c7e41beb87.tar.gz
[PATCH] Dereference in tokenring/olympic.c
hi, coverity found (bug id #225) that we might call free_netdev() with NULL argument, when alloc_trdev() fails. This patch changes the goto, so we dont call free_netdev() for dev == NULL. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/tokenring')
-rw-r--r--drivers/net/tokenring/olympic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/tokenring/olympic.c b/drivers/net/tokenring/olympic.c
index 23032a7..c3cb8d2 100644
--- a/drivers/net/tokenring/olympic.c
+++ b/drivers/net/tokenring/olympic.c
@@ -217,7 +217,7 @@ static int __devinit olympic_probe(struct pci_dev *pdev, const struct pci_device
dev = alloc_trdev(sizeof(struct olympic_private)) ;
if (!dev) {
i = -ENOMEM;
- goto op_free_dev;
+ goto op_release_dev;
}
olympic_priv = dev->priv ;
@@ -282,8 +282,8 @@ op_free_iomap:
if (olympic_priv->olympic_lap)
iounmap(olympic_priv->olympic_lap);
-op_free_dev:
free_netdev(dev);
+op_release_dev:
pci_release_regions(pdev);
op_disable_dev:
OpenPOWER on IntegriCloud