* [PATCH] defxx: Fix the handling of ioremap() failures
@ 2007-05-29 15:12 Maciej W. Rozycki
2007-05-30 13:53 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Maciej W. Rozycki @ 2007-05-29 15:12 UTC (permalink / raw)
To: Andrew Morton, Jeff Garzik; +Cc: netdev, linux-kernel
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>
---
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 {
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] defxx: Fix the handling of ioremap() failures
2007-05-29 15:12 [PATCH] defxx: Fix the handling of ioremap() failures Maciej W. Rozycki
@ 2007-05-30 13:53 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2007-05-30 13:53 UTC (permalink / raw)
To: Maciej W. Rozycki; +Cc: Andrew Morton, netdev, linux-kernel
Maciej W. Rozycki wrote:
> 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>
applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-05-30 13:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-29 15:12 [PATCH] defxx: Fix the handling of ioremap() failures Maciej W. Rozycki
2007-05-30 13:53 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).