ALSA: aoa: Fix of-node refcount unbalance
authorTakashi Iwai <tiwai@suse.de>
Mon, 18 Feb 2019 13:41:25 +0000 (14:41 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 19 Feb 2019 21:20:45 +0000 (22:20 +0100)
We forgot to unreference a node obtained via of_find_node_by_name()
after its usage.

Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/aoa/core/gpio-feature.c

index 65557421fe0bad1c02d7975c545828d7e5bb4ec4..c3ff721e46607183f21afe6526db6cbcf0cd3956 100644 (file)
@@ -82,6 +82,7 @@ static struct device_node *get_gpio(char *name,
                        if (altname && (strcmp(audio_gpio, altname) == 0))
                                break;
                }
+               of_node_put(gpio);
                /* still not found, assume not there */
                if (!np)
                        return NULL;