ionic: remove unnecessary NULL test
authorShannon Nelson <shannon.nelson@amd.com>
Wed, 6 Mar 2024 23:29:57 +0000 (15:29 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Mar 2024 11:54:34 +0000 (11:54 +0000)
We call ionic_rx_page_alloc() only on existing buf_info structs from
ionic_rx_fill().  There's no need for the additional NULL test.

Reviewed-by: Brett Creeley <brett.creeley@amd.com>
Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/pensando/ionic/ionic_txrx.c

index af414707d614d8a6a1db4d7712037eb10739bc70..3bb3534b3d25a199b6071acf9655d7f40a0634d5 100644 (file)
@@ -135,12 +135,6 @@ static int ionic_rx_page_alloc(struct ionic_queue *q,
        dev = q->dev;
        stats = q_to_rx_stats(q);
 
-       if (unlikely(!buf_info)) {
-               net_err_ratelimited("%s: %s invalid buf_info in alloc\n",
-                                   dev_name(dev), q->name);
-               return -EINVAL;
-       }
-
        page = alloc_pages(IONIC_PAGE_GFP_MASK, 0);
        if (unlikely(!page)) {
                net_err_ratelimited("%s: %s page alloc failed\n",