mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-18 03:06:43 +00:00
powerpc/pseries/iommu: Add of_node_put() before break
Fix following coccicheck warning: ./arch/powerpc/platforms/pseries/iommu.c:924:1-28: WARNING: Function for_each_node_with_property should have of_node_put() before break Early exits from for_each_node_with_property should decrement the node reference counter. Signed-off-by: Wan Jiabing <wanjiabing@vivo.com> Reviewed-by: Leonardo Bras <leobras.c@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20211014075624.16344-1-wanjiabing@vivo.com
This commit is contained in:
parent
4f703e7faa
commit
915b368f69
@ -929,8 +929,10 @@ static void find_existing_ddw_windows_named(const char *name)
|
||||
}
|
||||
|
||||
window = ddw_list_new_entry(pdn, dma64);
|
||||
if (!window)
|
||||
if (!window) {
|
||||
of_node_put(pdn);
|
||||
break;
|
||||
}
|
||||
|
||||
spin_lock(&dma_win_list_lock);
|
||||
list_add(&window->list, &dma_win_list);
|
||||
|
Loading…
x
Reference in New Issue
Block a user