realtek: eth: drop redundant DTS check

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>
This commit is contained in:
Markus Stockhausen 2026-03-25 21:18:24 +01:00 committed by Hauke Mehrtens
parent 5b827eb91f
commit d56d70fc66

View 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);