]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
defxx: Fix the handling of ioremap() failures
authorMaciej W. Rozycki <macro@linux-mips.org>
Tue, 29 May 2007 15:12:22 +0000 (16:12 +0100)
committerJeff Garzik <jeff@garzik.org>
Wed, 30 May 2007 13:52:48 +0000 (09:52 -0400)
 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>
drivers/net/defxx.c

index 571d82f8008c4e9fff3d0b7cff680143b5a9d31c..7df23dc28190c37fd5014480aade885053021ef4 100644 (file)
@@ -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 {