ASoC: Intel: Remove invalid kfree of devm allocated data
authorJin Yao <yao.jin@linux.intel.com>
Mon, 13 Apr 2015 06:20:54 +0000 (14:20 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 27 Apr 2015 14:43:43 +0000 (15:43 +0100)
kbuild robot reports following warning:
"sound/soc/intel/haswell/sst-haswell-ipc.c:2204:1-6:
 WARNING: invalid free of devm_ allocated data"

As julia explains to me, the memory allocated with devm_kalloc
is freed automatically on failure of a probe function. So this
kfree should be removed otherwise the double free will be got in
error handler path.

Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/haswell/sst-haswell-ipc.c

index 344a1e9bbce5794311ec95a24143581ebf715907..324eceb07b255b06e71c07cd1267a55364ce403e 100644 (file)
@@ -2201,7 +2201,6 @@ dma_err:
 dsp_new_err:
        sst_ipc_fini(ipc);
 ipc_init_err:
-       kfree(hsw);
        return ret;
 }
 EXPORT_SYMBOL_GPL(sst_hsw_dsp_init);