]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: slave: fix of-node leak and phy priority
authorJohan Hovold <johan@kernel.org>
Mon, 28 Nov 2016 18:24:54 +0000 (19:24 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Nov 2016 04:17:02 +0000 (23:17 -0500)
commita0a50cd841c437b4ec57c552eedfd14acc43a632
treef9a76fd26ee475b2258df059c386abb80099f089
parent0ac86881686ab9c01976c7ed4dfa1f89875add4e
net: dsa: slave: fix of-node leak and phy priority

Make sure to drop the reference taken by of_parse_phandle() before
returning from dsa_slave_phy_setup().

Note that this also modifies the PHY priority so that any fixed-link
node is only parsed when no phy-handle is given, which is in accordance
with the common scheme for this.

Fixes: d2ef8618baf2 ("net: dsa: allow for more complex PHY setups")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/slave.c