diff mbox

ASoC: nau8810: Fix memory leak in nau8810_eq_put error path

Message ID 1472086527-14900-1-git-send-email-axel.lin@ingics.com (mailing list archive)
State Accepted
Commit ec103964776bf8af74e66eb1a810eada757718a5
Headers show

Commit Message

Axel Lin Aug. 25, 2016, 12:55 a.m. UTC
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 sound/soc/codecs/nau8810.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/sound/soc/codecs/nau8810.c b/sound/soc/codecs/nau8810.c
index f9bcdc3..e455186 100644
--- a/sound/soc/codecs/nau8810.c
+++ b/sound/soc/codecs/nau8810.c
@@ -221,6 +221,7 @@  static int nau8810_eq_put(struct snd_kcontrol *kcontrol,
 		if (ret) {
 			dev_err(codec->dev, "EQ configuration fail, register: %x ret: %d\n",
 				reg + i, ret);
+			kfree(data);
 			return ret;
 		}
 	}