Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8a323526 authored by Maciej W. Rozycki's avatar Maciej W. Rozycki Committed by Jeff Garzik
Browse files

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: default avatarMaciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 34dd962b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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 {