Message ID | alpine.DEB.2.22.394.2107111810480.13622@hadrien (mailing list archive) |
---|---|
State | Accepted |
Commit | 84f7e0bb4809f4497124b6b6904c07c8a0c73c58 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | dsa: fix for_each_child.cocci warnings | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Not a local patch |
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Sun, 11 Jul 2021 18:12:56 +0200 (CEST) you wrote: > From: kernel test robot <lkp@intel.com> > > 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 > > [...] Here is the summary with links: - dsa: fix for_each_child.cocci warnings https://git.kernel.org/netdev/net/c/84f7e0bb4809 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
On 7/11/2021 10:10 AM, patchwork-bot+netdevbpf@kernel.org wrote: > Hello: > > This patch was applied to netdev/net.git (refs/heads/master): > > On Sun, 11 Jul 2021 18:12:56 +0200 (CEST) you wrote: >> From: kernel test robot <lkp@intel.com> >> >> 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 >> >> [...] > > Here is the summary with links: > - dsa: fix for_each_child.cocci warnings > https://git.kernel.org/netdev/net/c/84f7e0bb4809 The patch subject should have been: net: dsa: microchip: fix for_each_child.cocci warning (singular, not plural), yes I like to paint my bike shed blue. -- Florian
--- a/drivers/net/dsa/microchip/ksz_common.c +++ b/drivers/net/dsa/microchip/ksz_common.c @@ -419,8 +419,10 @@ int ksz_switch_register(struct ksz_devic 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); }