ASoC: nau8810: Fix memory leak in nau8810_eq_put error path
authorAxel Lin <axel.lin@ingics.com>
Thu, 25 Aug 2016 00:55:27 +0000 (08:55 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 1 Sep 2016 20:06:14 +0000 (21:06 +0100)
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/nau8810.c

index f9bcdc33df84318548dabf1b18882470bcf58ad6..e45518629968b53ab01a044459a237f0ef1eb29f 100644 (file)
@@ -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;
                }
        }