pinctrl: intel: Get rid of redundant 'else' in intel_config_set_debounce()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 12 Jun 2020 14:49:57 +0000 (17:49 +0300)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 22 Jun 2020 07:58:51 +0000 (10:58 +0300)
In a code like
if (...) {
...
goto label;
} else {
...
}
the 'else' keyword is redundant. Get rid of it for better readability.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/pinctrl/intel/pinctrl-intel.c

index e05273a..76b1b89 100644 (file)
@@ -719,12 +719,12 @@ static int intel_config_set_debounce(struct intel_pinctrl *pctrl,
                if (v < 3 || v > 15) {
                        ret = -EINVAL;
                        goto exit_unlock;
-               } else {
-                       /* Enable glitch filter and debouncer */
-                       value0 |= PADCFG0_PREGFRXSEL;
-                       value2 |= v << PADCFG2_DEBOUNCE_SHIFT;
-                       value2 |= PADCFG2_DEBEN;
                }
+
+               /* Enable glitch filter and debouncer */
+               value0 |= PADCFG0_PREGFRXSEL;
+               value2 |= v << PADCFG2_DEBOUNCE_SHIFT;
+               value2 |= PADCFG2_DEBEN;
        }
 
        writel(value0, padcfg0);