Skip to content

Commit 0709274

Browse files
nikita-youshkuba-moo
authored andcommitted
net: renesas: rswitch: do not deinit disabled ports
In rswitch_ether_port_init_all(), only enabled ports are initialized. Then, rswitch_ether_port_deinit_all() shall also only deinitialize enabled ports. Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Link: https://patch.msgid.link/20241206192140.1714-1-nikita.yoush@cogentembedded.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 8a241ef commit 0709274

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/renesas/rswitch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1527,7 +1527,7 @@ static void rswitch_ether_port_deinit_all(struct rswitch_private *priv)
15271527
{
15281528
unsigned int i;
15291529

1530-
for (i = 0; i < RSWITCH_NUM_PORTS; i++) {
1530+
rswitch_for_each_enabled_port(priv, i) {
15311531
phy_exit(priv->rdev[i]->serdes);
15321532
rswitch_ether_port_deinit_one(priv->rdev[i]);
15331533
}

0 commit comments

Comments
 (0)