struct device_node *np = dev->of_node;
        const struct imx93_clk_root *root;
        const struct imx93_clk_ccgr *ccgr;
-       void __iomem *base = NULL;
+       void __iomem *base, *anatop_base;
        int i, ret;
 
        clk_hw_data = kzalloc(struct_size(clk_hw_data, hws,
                                                                    "sys_pll_pfd2", 1, 2);
 
        np = of_find_compatible_node(NULL, NULL, "fsl,imx93-anatop");
-       base = of_iomap(np, 0);
+       anatop_base = of_iomap(np, 0);
        of_node_put(np);
-       if (WARN_ON(!base))
+       if (WARN_ON(!anatop_base))
                return -ENOMEM;
 
-       clks[IMX93_CLK_AUDIO_PLL] = imx_clk_fracn_gppll("audio_pll", "osc_24m", base + 0x1200,
+       clks[IMX93_CLK_AUDIO_PLL] = imx_clk_fracn_gppll("audio_pll", "osc_24m", anatop_base + 0x1200,
                                                        &imx_fracn_gppll);
-       clks[IMX93_CLK_VIDEO_PLL] = imx_clk_fracn_gppll("video_pll", "osc_24m", base + 0x1400,
+       clks[IMX93_CLK_VIDEO_PLL] = imx_clk_fracn_gppll("video_pll", "osc_24m", anatop_base + 0x1400,
                                                        &imx_fracn_gppll);
 
        np = dev->of_node;
        base = devm_platform_ioremap_resource(pdev, 0);
-       if (WARN_ON(IS_ERR(base)))
+       if (WARN_ON(IS_ERR(base))) {
+               iounmap(anatop_base);
                return PTR_ERR(base);
+       }
 
        for (i = 0; i < ARRAY_SIZE(root_array); i++) {
                root = &root_array[i];
 
 unregister_hws:
        imx_unregister_hw_clocks(clks, IMX93_CLK_END);
+       iounmap(anatop_base);
 
        return ret;
 }