Commit 8a32352661cc8e942897d205ba18f871ef7be597

Authored by Maciej W. Rozycki
Committed by Jeff Garzik
1 parent 34dd962b74

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: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff

... ... @@ -566,6 +566,7 @@
566 566 bp->base.mem = ioremap_nocache(bar_start, bar_len);
567 567 if (!bp->base.mem) {
568 568 printk(KERN_ERR "%s: Cannot map MMIO\n", print_name);
  569 + err = -ENOMEM;
569 570 goto err_out_region;
570 571 }
571 572 } else {