On Tue, Sep 15, 2026 at 5:48 AM Evgeny Sokolov <[email protected]>
wrote:

> From: Sokolov Evgeny <[email protected]>
>
> Use BNXT_ULP_INTF_TYPE_INVALID when checking the interface type
> returned by ulp_port_db_port_type_get().
>
> Comparing the enum value explicitly makes the code clearer and
> avoids relying on the numeric value of the invalid interface type.
>
> Found by InfoTeCS on behalf of Linux Verification Center (linuxtesting.org)
> with SVACE.
>
> Signed-off-by: Sokolov Evgeny <[email protected]>
> ---
>  drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
> b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
> index 26823858b5..442a795430 100644
> --- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
> +++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c
> @@ -3108,7 +3108,7 @@ ulp_rte_port_act_handler(const struct
> rte_flow_action *act_item,
>
>         /* Get the intf type */
>         intf_type = ulp_port_db_port_type_get(param->ulp_ctx, ifindex);
> -       if (!intf_type) {
> +       if (intf_type == BNXT_ULP_INTF_TYPE_INVALID) {
>                 BNXT_DRV_DBG(ERR, "Invalid port type\n");
>                 return BNXT_TF_RC_ERROR;
>         }
> --

Acked-by: Kishore Padmanabha <[email protected]>

>
> 2.30.2
>
>

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to