提交 8a323526 编写于 作者: M Maciej W. Rozycki 提交者: Jeff Garzik

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: NMaciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 34dd962b
......@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册