static void p1022ds_set_monitor_port(int monitor_port)
 {
        struct device_node *pixis_node;
+       void __iomem *pixis;
        u8 __iomem *brdcfg1;
 
        pixis_node = of_find_compatible_node(NULL, NULL, "fsl,p1022ds-pixis");
                return;
        }
 
-       brdcfg1 = of_iomap(pixis_node, 0);
-       if (!brdcfg1) {
+       pixis = of_iomap(pixis_node, 0);
+       if (!pixis) {
                pr_err("p1022ds: could not map ngPIXIS registers\n");
                return;
        }
-       brdcfg1 += 9;   /* BRDCFG1 is at offset 9 in the ngPIXIS */
+       brdcfg1 = pixis + 9;    /* BRDCFG1 is at offset 9 in the ngPIXIS */
 
        switch (monitor_port) {
        case 0: /* DVI */
        default:
                pr_err("p1022ds: unsupported monitor port %i\n", monitor_port);
        }
+
+       iounmap(pixis);
 }
 
 /**
 
        /* Enable the clock and set the pxclk */
        setbits32(&guts->clkdvdr, CLKDVDR_PXCKEN | (pxclk << 16));
+
+       iounmap(guts);
 }
 
 /**