diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-11-25 20:00:39 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-25 20:00:39 -0500 |
commit | 99da1a8a6dc549630733e1cc246265d282fc214e (patch) | |
tree | 176553ab6ff325922b2667d0b7ac0ec7b8ad0981 /drivers/net/depca.c | |
parent | a098397d562e2ce5aca7b9b007a4954d88ef8f5e (diff) |
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/depca.c')
-rw-r--r-- | drivers/net/depca.c | 7 |
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) | |||
1556 | #ifdef CONFIG_EISA | 1556 | #ifdef CONFIG_EISA |
1557 | static int __init depca_eisa_probe (struct device *device) | 1557 | static int __init depca_eisa_probe (struct device *device) |
1558 | { | 1558 | { |
1559 | enum depca_type adapter = unknown; | ||
1559 | struct eisa_device *edev; | 1560 | struct eisa_device *edev; |
1560 | struct net_device *dev; | 1561 | struct net_device *dev; |
1561 | struct depca_private *lp; | 1562 | struct depca_private *lp; |
@@ -1574,7 +1575,11 @@ static int __init depca_eisa_probe (struct device *device) | |||
1574 | * the EISA configuration structures (yet... :-), just rely on | 1575 | * the EISA configuration structures (yet... :-), just rely on |
1575 | * the ISA probing to sort it out... */ | 1576 | * the ISA probing to sort it out... */ |
1576 | 1577 | ||
1577 | depca_shmem_probe (&mem_start); | 1578 | adapter = depca_shmem_probe (&mem_start); |
1579 | if (adapter == unknown) { | ||
1580 | status = -ENODEV; | ||
1581 | goto out_free; | ||
1582 | } | ||
1578 | 1583 | ||
1579 | dev->base_addr = ioaddr; | 1584 | dev->base_addr = ioaddr; |
1580 | dev->irq = irq; | 1585 | dev->irq = irq; |