mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 05:55:44 +02:00
net: mvpp2: Put fwnode in error case during ->probe()
[ Upstream commit71f0891c84] In each iteration fwnode_for_each_available_child_node() bumps a reference counting of a loop variable followed by dropping in on a next iteration, Since in error case the loop is broken, we have to drop a reference count by ourselves. Do it for port_fwnode in error case during ->probe(). Fixes:248122212f("net: mvpp2: use device_*/fwnode_* APIs instead of of_*") Cc: Marcin Wojtas <mw@semihalf.com> Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
b3fecbf60e
commit
2f9f23c43a
|
|
@ -7045,6 +7045,8 @@ static int mvpp2_probe(struct platform_device *pdev)
|
|||
return 0;
|
||||
|
||||
err_port_probe:
|
||||
fwnode_handle_put(port_fwnode);
|
||||
|
||||
i = 0;
|
||||
fwnode_for_each_available_child_node(fwnode, port_fwnode) {
|
||||
if (priv->port_list[i])
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user