summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2007-05-29 17:12:22 +0200
committerJeff Garzik <jeff@garzik.org>2007-05-30 15:52:48 +0200
commit8a32352661cc8e942897d205ba18f871ef7be597 (patch)
tree45b454ff1dd0ce3e866eb53b5222bf3725e93632
parentsky2: program proper register for fiber PHY (diff)
downloadlinux-8a32352661cc8e942897d205ba18f871ef7be597.tar.xz
linux-8a32352661cc8e942897d205ba18f871ef7be597.zip
defxx: Fix the handling of ioremap() failures
If ioremap_nocache() is unfortunate enough to fail, the error code is not set correctly leading to a false success from dfx_register(). This change fixes the problem. Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r--drivers/net/defxx.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/defxx.c b/drivers/net/defxx.c
index 571d82f8008c..7df23dc28190 100644
--- a/drivers/net/defxx.c
+++ b/drivers/net/defxx.c
@@ -566,6 +566,7 @@ static int __devinit dfx_register(struct device *bdev)
bp->base.mem = ioremap_nocache(bar_start, bar_len);
if (!bp->base.mem) {
printk(KERN_ERR "%s: Cannot map MMIO\n", print_name);
+ err = -ENOMEM;
goto err_out_region;
}
} else {