diff options
| author | wangdicheng <wangdicheng@kylinos.cn> | 2026-04-03 09:47:36 +0800 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2026-04-03 10:10:23 +0200 |
| commit | e5d5aef802a5f41283084f7d443ef4fd4b65d86d (patch) | |
| tree | cea1171b11f99f292c6822d19808dd31f87f6991 /sound/aoa | |
| parent | 4513d3e0bbc0585b86ccf2631902593ff97e88f5 (diff) | |
ALSA: aoa/onyx: Fix OF node leak on probe failure
Add missing of_node_put() in the error path.
Signed-off-by: wangdicheng <wangdicheng@kylinos.cn>
Link: https://patch.msgid.link/20260403014736.33014-1-wangdich9700@163.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/aoa')
| -rw-r--r-- | sound/aoa/codecs/onyx.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/aoa/codecs/onyx.c b/sound/aoa/codecs/onyx.c index 04961c456d2c..da0eebf5dfbc 100644 --- a/sound/aoa/codecs/onyx.c +++ b/sound/aoa/codecs/onyx.c @@ -980,10 +980,12 @@ static int onyx_i2c_probe(struct i2c_client *client) onyx->codec.node = of_node_get(node); if (aoa_codec_register(&onyx->codec)) { - goto fail; + goto fail_put; } printk(KERN_DEBUG PFX "created and attached onyx instance\n"); return 0; + fail_put: + of_node_put(onyx->codec.node); fail: kfree(onyx); return -ENODEV; |
