]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: rk3399: fix missing braces in full pinctrl
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Fri, 4 Jan 2019 18:09:08 +0000 (19:09 +0100)
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Sun, 6 Jan 2019 14:26:31 +0000 (15:26 +0100)
Braces around the error-case for rk3399_pinctrl_set_pin_pupd lead to
an unconditional (and unintended) return from the function without it
ever setting pin-configurations.

Fix it.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/pinctrl/rockchip/pinctrl_rk3399.c

index c4746b0122de4e1070fcde92c40edd42a2145e29..5c5af3a0bd431aed3bacc7146c7d8b62a53ada92 100644 (file)
@@ -130,13 +130,14 @@ static void rk3399_pinctrl_set_pin_pupd(uintptr_t grf_addr,
 
        if (pinconfig & (1 << PIN_CONFIG_BIAS_PULL_UP))
                pupdval = RK_GRF_P_PULLUP;
-       else if (pinconfig & (1 << PIN_CONFIG_BIAS_PULL_DOWN))
+       else if (pinconfig & (1 << PIN_CONFIG_BIAS_PULL_DOWN)) {
                pupdval = RK_GRF_P_PULLDOWN;
-       else
+       } else {
                /* Flag not supported. */
                pr_warn("%s: Unsupported pinconfig flag: 0x%x\n", __func__,
                        pinconfig);
                return;
+       }
 
        pupd_base = grf_addr + (uintptr_t)bank->pupd_offset;
        rk_pinctrl_get_info(pupd_base, index, &addr, &shift, &mask);