]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ALSA: ppc: Fix of-node refcount unbalance
authorTakashi Iwai <tiwai@suse.de>
Mon, 18 Feb 2019 14:05:24 +0000 (15:05 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 19 Feb 2019 21:20:46 +0000 (22:20 +0100)
We forgot to unreference the node when aborting from the loop of
for_each_child_of_node() in snd_pmac_tumbler_init().  This leads to
unbalanced node refcount.  Fix it by adding the missing of_node_put()
call.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/ppc/tumbler.c

index 6d7ffffcce95b6a7b97e1ca046eefb2f30309841..78e5798ae96715555b7546f2ec83ff80429dead4 100644 (file)
@@ -1371,6 +1371,7 @@ int snd_pmac_tumbler_init(struct snd_pmac *chip)
                                mix->anded_reset = 1;
                        if (of_get_property(np, "layout-id", NULL))
                                mix->reset_on_sleep = 0;
+                       of_node_put(np);
                        break;
                }
        }