提交 84f7e0bb 编写于 作者: K kernel test robot 提交者: David S. Miller

dsa: fix for_each_child.cocci warnings

For_each_available_child_of_node should have of_node_put() before
return around line 423.

Generated by: scripts/coccinelle/iterators/for_each_child.cocci

CC: Alexander Lobakin <alobakin@pm.me>
Reported-by: Nkernel test robot <lkp@intel.com>
Signed-off-by: Nkernel test robot <lkp@intel.com>
Signed-off-by: NJulia Lawall <julia.lawall@inria.fr>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 222722bc
......@@ -419,8 +419,10 @@ int ksz_switch_register(struct ksz_device *dev,
if (of_property_read_u32(port, "reg",
&port_num))
continue;
if (!(dev->port_mask & BIT(port_num)))
if (!(dev->port_mask & BIT(port_num))) {
of_node_put(port);
return -EINVAL;
}
of_get_phy_mode(port,
&dev->ports[port_num].interface);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册