Merge branch 'omap-for-v4.14/fixes' into omap-for-v4.15/fixes-v2
[sfrench/cifs-2.6.git] / arch / arm / mach-omap2 / omap_hwmod_3xxx_data.c
index 9cfba4125d630e6852d0e125013dabc383d61481..52c9d585b44d2607f4d0a4c5d0b1b1d01cb4bac3 100644 (file)
@@ -1646,6 +1646,7 @@ static struct omap_hwmod omap3xxx_mmc3_hwmod = {
        .main_clk       = "mmchs3_fck",
        .prcm           = {
                .omap2 = {
+                       .module_offs = CORE_MOD,
                        .prcm_reg_id = 1,
                        .module_bit = OMAP3430_EN_MMC3_SHIFT,
                        .idlest_reg_id = 1,
@@ -3107,7 +3108,7 @@ int __init omap3xxx_hwmod_init(void)
        int r;
        struct omap_hwmod_ocp_if **h = NULL, **h_gp = NULL, **h_sham = NULL;
        struct omap_hwmod_ocp_if **h_aes = NULL;
-       struct device_node *bus = NULL;
+       struct device_node *bus;
        unsigned int rev;
 
        omap_hwmod_init();
@@ -3167,18 +3168,14 @@ int __init omap3xxx_hwmod_init(void)
 
        if (h_sham && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "sham")) {
                r = omap_hwmod_register_links(h_sham);
-               if (r < 0) {
-                       of_node_put(bus);
-                       return r;
-               }
+               if (r < 0)
+                       goto put_node;
        }
 
        if (h_aes && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "aes")) {
                r = omap_hwmod_register_links(h_aes);
-               if (r < 0) {
-                       of_node_put(bus);
-                       return r;
-               }
+               if (r < 0)
+                       goto put_node;
        }
        of_node_put(bus);
 
@@ -3229,4 +3226,8 @@ int __init omap3xxx_hwmod_init(void)
        r = omap_hwmod_register_links(omap3xxx_dss_hwmod_ocp_ifs);
 
        return r;
+
+put_node:
+       of_node_put(bus);
+       return r;
 }