mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-05-04 17:36:12 +02:00
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:
parent
5b827eb91f
commit
d56d70fc66
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user