if (reg->puen) {
                enable = sh_pfc_read(pfc, reg->puen) & ~BIT(bit);
-               if (bias != PIN_CONFIG_BIAS_DISABLE)
+               if (bias != PIN_CONFIG_BIAS_DISABLE) {
                        enable |= BIT(bit);
 
-               if (reg->pud) {
-                       updown = sh_pfc_read(pfc, reg->pud) & ~BIT(bit);
-                       if (bias == PIN_CONFIG_BIAS_PULL_UP)
-                               updown |= BIT(bit);
+                       if (reg->pud) {
+                               updown = sh_pfc_read(pfc, reg->pud) & ~BIT(bit);
+                               if (bias == PIN_CONFIG_BIAS_PULL_UP)
+                                       updown |= BIT(bit);
 
-                       sh_pfc_write(pfc, reg->pud, updown);
+                               sh_pfc_write(pfc, reg->pud, updown);
+                       }
                }
-
                sh_pfc_write(pfc, reg->puen, enable);
        } else {
                enable = sh_pfc_read(pfc, reg->pud) & ~BIT(bit);