mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 05:44:11 +00:00
ALSA: ac97: Fix of-node refcount unbalance
commit31d2350d60
upstream. ac97_of_get_child_device() take the refcount of the node explicitly via of_node_get(), but this leads to an unbalance. The for_each_child_of_node() loop itself takes the refcount for each iteration node, hence you don't need to take the extra refcount again. Fixes:2225a3e6af
("ALSA: ac97: add codecs devicetree binding") Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c8e91d7567
commit
ff7a1f81c2
1 changed files with 1 additions and 1 deletions
|
@ -84,7 +84,7 @@ ac97_of_get_child_device(struct ac97_controller *ac97_ctrl, int idx,
|
|||
if ((idx != of_property_read_u32(node, "reg", ®)) ||
|
||||
!of_device_is_compatible(node, compat))
|
||||
continue;
|
||||
return of_node_get(node);
|
||||
return node;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in a new issue