summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-11-25 17:00:39 -0800
committerDavid S. Miller <davem@davemloft.net>2008-11-25 17:00:39 -0800
commit99da1a8a6dc549630733e1cc246265d282fc214e (patch)
tree176553ab6ff325922b2667d0b7ac0ec7b8ad0981 /drivers/net
parenta098397d562e2ce5aca7b9b007a4954d88ef8f5e (diff)
downloadblackbird-op-linux-99da1a8a6dc549630733e1cc246265d282fc214e.tar.gz
blackbird-op-linux-99da1a8a6dc549630733e1cc246265d282fc214e.zip
depca: fix warning in drivers/net/depca.c
fix warning: drivers/net/depca.c: In function ‘depca_eisa_probe’: drivers/net/depca.c:1564: warning: ‘mem_start’ may be used uninitialized in this function this seems to be a real bug - depca_eisa_probe() does not check for failure. Add it, symmetric to depca_isa_probe(). Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/depca.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/depca.c b/drivers/net/depca.c
index ec34f03cb982..e4cef491dc73 100644
--- a/drivers/net/depca.c
+++ b/drivers/net/depca.c
@@ -1556,6 +1556,7 @@ static int __init depca_isa_probe (struct platform_device *device)
#ifdef CONFIG_EISA
static int __init depca_eisa_probe (struct device *device)
{
+ enum depca_type adapter = unknown;
struct eisa_device *edev;
struct net_device *dev;
struct depca_private *lp;
@@ -1574,7 +1575,11 @@ static int __init depca_eisa_probe (struct device *device)
* the EISA configuration structures (yet... :-), just rely on
* the ISA probing to sort it out... */
- depca_shmem_probe (&mem_start);
+ adapter = depca_shmem_probe (&mem_start);
+ if (adapter == unknown) {
+ status = -ENODEV;
+ goto out_free;
+ }
dev->base_addr = ioaddr;
dev->irq = irq;
OpenPOWER on IntegriCloud