diff options
author | Krzysztof Halasa <khc@pm.waw.pl> | 2006-06-22 16:29:28 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-06-22 23:32:03 -0400 |
commit | 4446065a2c9b65398ceb115f4d8c256eb1bb9647 (patch) | |
tree | cdaa04d42876632e0df95054d46851cac6648ce3 /drivers/net/wan/n2.c | |
parent | 4a31e348e3ecaf54c50240109ac4574b180f8840 (diff) |
[PATCH] WAN: ioremap() failure checks in drivers
Eric Sesterhenn found that pci200syn initialization lacks return
statement in ioremap() error path (coverity bug id #195). It looks
like more WAN drivers have problems with ioremap().
Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/wan/n2.c')
-rw-r--r-- | drivers/net/wan/n2.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wan/n2.c b/drivers/net/wan/n2.c index cd32751b64eb..b7d88db89a5c 100644 --- a/drivers/net/wan/n2.c +++ b/drivers/net/wan/n2.c | |||
@@ -387,6 +387,11 @@ static int __init n2_run(unsigned long io, unsigned long irq, | |||
387 | } | 387 | } |
388 | card->phy_winbase = winbase; | 388 | card->phy_winbase = winbase; |
389 | card->winbase = ioremap(winbase, USE_WINDOWSIZE); | 389 | card->winbase = ioremap(winbase, USE_WINDOWSIZE); |
390 | if (!card->winbase) { | ||
391 | printk(KERN_ERR "n2: ioremap() failed\n"); | ||
392 | n2_destroy_card(card); | ||
393 | return -EFAULT; | ||
394 | } | ||
390 | 395 | ||
391 | outb(0, io + N2_PCR); | 396 | outb(0, io + N2_PCR); |
392 | outb(winbase >> 12, io + N2_BAR); | 397 | outb(winbase >> 12, io + N2_BAR); |