Skip to content

Commit 99da1a8

Browse files
Ingo Molnardavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a098397 commit 99da1a8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

drivers/net/depca.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1556,6 +1556,7 @@ static int __init depca_isa_probe (struct platform_device *device)
15561556
#ifdef CONFIG_EISA
15571557
static int __init depca_eisa_probe (struct device *device)
15581558
{
1559+
enum depca_type adapter = unknown;
15591560
struct eisa_device *edev;
15601561
struct net_device *dev;
15611562
struct depca_private *lp;
@@ -1574,7 +1575,11 @@ static int __init depca_eisa_probe (struct device *device)
15741575
* the EISA configuration structures (yet... :-), just rely on
15751576
* the ISA probing to sort it out... */
15761577

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+
}
15781583

15791584
dev->base_addr = ioaddr;
15801585
dev->irq = irq;

0 commit comments

Comments
 (0)