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 <[EMAIL PROTECTED]>
---

 Please apply.

  Maciej

patch-mips-2.6.21-20070502-defxx-ioremap-0
diff -up --recursive --new-file 
linux-mips-2.6.21-20070502.macro/drivers/net/defxx.c 
linux-mips-2.6.21-20070502/drivers/net/defxx.c
--- linux-mips-2.6.21-20070502.macro/drivers/net/defxx.c        2007-02-21 
05:56:25.000000000 +0000
+++ linux-mips-2.6.21-20070502/drivers/net/defxx.c      2007-05-16 
21:26:43.000000000 +0000
@@ -566,6 +566,7 @@ static int __devinit dfx_register(struct
                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 {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to