]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
realtek: eth: drop redundant DTS check
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Wed, 25 Mar 2026 20:18:24 +0000 (21:18 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Thu, 26 Mar 2026 14:26:26 +0000 (15:26 +0100)
The ethernet driver is only loaded via devicetree and makes use
of of_match_table. In this case the probing function is only
called if a matching compatible is set. So pdev->dev.of_node
can never be NULL.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22610
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c

index 33f972544d6c209b94882db27fa8812022f347e1..bec21648ad82b3225e10f618bd732ef710d1a4ef 100644 (file)
@@ -1489,11 +1489,6 @@ static int rtl838x_eth_probe(struct platform_device *pdev)
        pr_info("Probing RTL838X eth device pdev: %x, dev: %x\n",
                (u32)pdev, (u32)(&pdev->dev));
 
-       if (!dn) {
-               dev_err(&pdev->dev, "No DT found\n");
-               return -EINVAL;
-       }
-
        cfg = device_get_match_data(&pdev->dev);
 
        dev = devm_alloc_etherdev_mqs(&pdev->dev, sizeof(struct rteth_ctrl), RTETH_TX_RINGS, RTETH_RX_RINGS);