]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: gateworks: gw_ventana: fix building with GCC 12.2
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Wed, 12 Oct 2022 16:59:27 +0000 (18:59 +0200)
committerTom Rini <trini@konsulko.com>
Sat, 22 Oct 2022 01:37:47 +0000 (21:37 -0400)
Building with GCC 12.2 results in an error

    board/gateworks/gw_ventana/gw_ventana.c:636:68: error: the comparison
    will always evaluate as 'true' for the address of 'pwm_padmux' will
    never be NULL [-Werror=address]
      636 |                 } else if (hwconfig_subarg_cmp(arg, "mode", "pwm") &&
          |                                                                    ^~

Remove the superfluous check.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-By: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
board/gateworks/gw_ventana/gw_ventana.c

index 99f52b9953e23e3c1b7ce2d50e83fefb7a94d95e..78d317d8647012dea90d3efd7a358a63d78e42fd 100644 (file)
@@ -633,8 +633,7 @@ void setup_board_gpio(int board, struct ventana_board_info *info)
                                               ctrl);
                        gpio_requestf(cfg->gpio_param, "dio%d", i);
                        gpio_direction_input(cfg->gpio_param);
-               } else if (hwconfig_subarg_cmp(arg, "mode", "pwm") &&
-                          cfg->pwm_padmux) {
+               } else if (hwconfig_subarg_cmp(arg, "mode", "pwm")) {
                        if (!cfg->pwm_param) {
                                printf("DIO%d:  Error: pwm config invalid\n",
                                       i);