realtek: mdio: avoid unneeded array initialization

rtmdio_probe() uses for_each_phy() to access dn[]. This will point
to initialized entries. No need to clear that array in advance.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22131
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
Markus Stockhausen 2026-02-21 14:26:02 +01:00 committed by Hauke Mehrtens
parent ea0a14f347
commit 4724649689

View file

@ -873,7 +873,7 @@ static int rtmdio_reset(struct mii_bus *bus)
static int rtmdio_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct device_node *dn[RTMDIO_MAX_PHY] = {}, *np;
struct device_node *np, *dn[RTMDIO_MAX_PHY];
struct rtmdio_ctrl *ctrl;
struct mii_bus *bus;
int ret, addr;