[PATCH] net/bnxt: remove redundant VNIC NULL check
Kishore Padmanabha
kishore.padmanabha at broadcom.com
Mon Sep 21 21:31:38 CEST 2026
On Tue, Sep 15, 2026 at 5:07 AM Evgeny Sokolov <Evgeny.Sokolov at infotecs.ru>
wrote:
> From: Sokolov Evgeny <Evgeny.Sokolov at infotecs.ru>
>
> Since commit 51fafb89a9a ("net/bnxt: get rid of ff pools and use
> VNIC info array"), VNIC objects are obtained from the VNIC info
> array.
>
> The address of an array element cannot be NULL, making the NULL
> check redundant.
>
> Remove the dead code.
>
> Found by InfoTeCS on behalf of Linux Verification Center (linuxtesting.org)
> with SVACE.
>
> Signed-off-by: Sokolov Evgeny <Evgeny.Sokolov at infotecs.ru>
> ---
> drivers/net/bnxt/bnxt_rxq.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
> index 023cb0e174..b7e16c8a14 100644
> --- a/drivers/net/bnxt/bnxt_rxq.c
> +++ b/drivers/net/bnxt/bnxt_rxq.c
> @@ -131,11 +131,6 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
>
> for (i = 0; i < pools; i++) {
> vnic = &bp->vnic_info[i];
> - if (!vnic) {
> - PMD_DRV_LOG_LINE(ERR, "VNIC alloc failed");
> - rc = -ENOMEM;
> - goto err_out;
> - }
> vnic->flags |= BNXT_VNIC_INFO_BCAST;
> bp->nr_vnics++;
>
> --
Acked-by: Kishore Padmanabha <kishore.padmanabha at broadcom.com>
>
> 2.30.2
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/stable/attachments/20260921/bade9e57/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5493 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mails.dpdk.org/archives/stable/attachments/20260921/bade9e57/attachment.bin>
More information about the stable
mailing list