Skip to contentSkip to conversation

ALSA: aoa/tas: Fix OF node leak on probe failure

PATCH Applied [email protected] 2 participants 2 messages Apr 2

Subsystems (2)

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 ALSA: aoa/tas: Fix OF node leak on probe failure

From: wangdicheng <[email protected]>

Add missing of_node_put() in the error path.

---
 sound/aoa/codecs/tas.c | 1 +
 1 file changed, 1 insertion(+)
sound/aoa/codecs/tas.c +1 -0
index 13da2b159ad0..25214d3da65d 100644
@@ -872,6 +872,7 @@ static int tas_i2c_probe(struct i2c_client *client)
 	return 0;
  fail:
 	mutex_destroy(&tas->mtx);
+	of_node_put(tas->codec.node);
 	kfree(tas);
 	return -EINVAL;
 }
Signature · 1 line
2.25.1