[PATCH 3/3] ALSA: ppc: Fix of-node refcount unbalance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---

Only compile-tested.  Please review carefully.  Thanks!

 sound/ppc/tumbler.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/ppc/tumbler.c b/sound/ppc/tumbler.c
index 6d7ffffcce95..78e5798ae967 100644
--- a/sound/ppc/tumbler.c
+++ b/sound/ppc/tumbler.c
@@ -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;
 		}
 	}
-- 
2.16.4

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux