]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: unregister cross-chip notifier after ds->ops->teardown
authorVladimir Oltean <vladimir.oltean@nxp.com>
Tue, 12 Oct 2021 12:37:35 +0000 (15:37 +0300)
committerJakub Kicinski <kuba@kernel.org>
Wed, 13 Oct 2021 20:36:01 +0000 (13:36 -0700)
commitf487b22f1eeb164b7c2df993fbbe3d59a7c05a80
treeed4ec9312ba839d2f3cba88664260bfb7639f56f
parent83207520881cd561b983805ec22b3f4e0acabea5
net: dsa: unregister cross-chip notifier after ds->ops->teardown

To be symmetric with the error unwind path of dsa_switch_setup(), call
dsa_switch_unregister_notifier() after ds->ops->teardown.

The implication is that ds->ops->teardown cannot emit cross-chip
notifiers. For example, currently the dsa_tag_8021q_unregister() call
from sja1105_teardown() does not propagate to the entire tree due to
this reason. However I cannot find an actual issue caused by this,
observed using code inspection.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://lore.kernel.org/r/20211012123735.2545742-1-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/dsa/dsa2.c