]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: macb: drop macb_config NULL checking
authorThéo Lebrun <theo.lebrun@bootlin.com>
Tue, 14 Oct 2025 15:25:06 +0000 (17:25 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 16 Oct 2025 23:59:25 +0000 (16:59 -0700)
Remove NULL checks on macb_config as it is always valid:
 - either it is its default value &default_gem_config,
 - or it got overridden using match data.

Reviewed-by: Sean Anderson <sean.anderson@linux.dev>
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
Link: https://patch.msgid.link/20251014-macb-cleanup-v1-5-31cd266e22cd@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/cadence/macb_main.c

index dad1188ef9d87fc3846590032995223174177e89..33e99aab1dcb360a699d0e80762ef421001d19a1 100644 (file)
@@ -5485,15 +5485,13 @@ static int macb_probe(struct platform_device *pdev)
        }
        bp->num_queues = num_queues;
        bp->queue_mask = queue_mask;
-       if (macb_config)
-               bp->dma_burst_length = macb_config->dma_burst_length;
+       bp->dma_burst_length = macb_config->dma_burst_length;
        bp->pclk = pclk;
        bp->hclk = hclk;
        bp->tx_clk = tx_clk;
        bp->rx_clk = rx_clk;
        bp->tsu_clk = tsu_clk;
-       if (macb_config)
-               bp->jumbo_max_len = macb_config->jumbo_max_len;
+       bp->jumbo_max_len = macb_config->jumbo_max_len;
 
        if (!hw_is_gem(bp->regs, bp->native_io))
                bp->max_tx_length = MACB_MAX_TX_LEN;