linux/drivers/net/dsa/qca
Vladimir Oltean 08932323cc net: dsa: qca8k: put MDIO controller OF node if unavailable
It was pointed out during the review [1] of commit e66bf63a7f ("net:
dsa: qca8k: skip MDIO bus creation if its OF node has status =
"disabled"") that we now leak a reference to the "mdio" OF node if it is
disabled.

This is only a concern when using dynamic OF as far as I can tell (like
probing on an overlay), since OF nodes are never freed in the regular
case. Additionally, I'm unaware of any actual device trees (in
production or elsewhere) which have status = "disabled" for the MDIO OF
node. So handling this as a simple enhancement.

[1] https://lore.kernel.org/netdev/CAJq09z4--Ug+3FAmp=EimQ8HTQYOWOuVon-PUMGB5a1N=RPv4g@mail.gmail.com/

Suggested-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2024-02-05 12:39:27 +00:00
..
ar9331.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-07-20 15:52:55 -07:00
Kconfig net: dsa: qca8k: add CONFIG_LEDS_TRIGGERS dependency 2023-06-02 10:55:41 +01:00
Makefile net: dsa: qca8k: add LEDs basic support 2023-04-19 12:59:15 +01:00
qca8k-8xxx.c net: dsa: qca8k: put MDIO controller OF node if unavailable 2024-02-05 12:39:27 +00:00
qca8k-common.c ethtool: replace struct ethtool_eee with a new struct ethtool_keee on kernel side 2024-01-31 12:30:47 +00:00
qca8k-leds.c net: dsa: qca8k: assign ds->user_mii_bus only for the non-OF case 2024-01-05 11:56:35 +00:00
qca8k.h ethtool: replace struct ethtool_eee with a new struct ethtool_keee on kernel side 2024-01-31 12:30:47 +00:00
qca8k_leds.h net: dsa: qca8k: add LEDs basic support 2023-04-19 12:59:15 +01:00