Skip to content

Commit

Permalink
defxx: Fix the handling of ioremap() failures
Browse files Browse the repository at this point in the history
 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>
  • Loading branch information
Maciej W. Rozycki authored and Jeff Garzik committed May 30, 2007
1 parent 34dd962 commit 8a32352
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/defxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8a32352

Please sign in to comment.