summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-02-18 14:38:06 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-03-27 14:17:56 +0900
commit5b099547f29d0e21c2982a4697ababd2f9dd55ea (patch)
tree19e70470318e4761b8608c324282b3adc4bcdbc2 /sound
parent1fa1bfef5f4c526ab707101f900cc09587f1dd9a (diff)
downloadtalos-obmc-linux-5b099547f29d0e21c2982a4697ababd2f9dd55ea.tar.gz
talos-obmc-linux-5b099547f29d0e21c2982a4697ababd2f9dd55ea.zip
ALSA: ac97: Fix of-node refcount unbalance
commit 31d2350d602511efc9ef626b848fe521233b0387 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: 2225a3e6af78 ("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>
Diffstat (limited to 'sound')
-rw-r--r--sound/ac97/bus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/ac97/bus.c b/sound/ac97/bus.c
index 9f0c480489ef..9cbf6927abe9 100644
--- a/sound/ac97/bus.c
+++ b/sound/ac97/bus.c
@@ -84,7 +84,7 @@ ac97_of_get_child_device(struct ac97_controller *ac97_ctrl, int idx,
if ((idx != of_property_read_u32(node, "reg", &reg)) ||
!of_device_is_compatible(node, compat))
continue;
- return of_node_get(node);
+ return node;
}
return NULL;
OpenPOWER on IntegriCloud