Thanks, Jie.
I find another simlar BUG in ./sound/soc/intel/baytrail/sst-baytrail-ipc.c::sst_byt_dsp_init() Does anyone fixed it, too?
Regards Firo
On Mon, Apr 27, 2015 at 07:23:32AM +0000, Jie, Yang wrote:
-----Original Message----- From: Firo Yang [mailto:firogm@gmail.com] Sent: Sunday, April 26, 2015 11:42 PM To: lgirdwood@gmail.com Cc: kernel-janitors@vger.kernel.org; broonie@kernel.org; perex@perex.cz; tiwai@suse.de; Jie, Yang; Lu, Han; jarkko.nikula@linux.intel.com; Piskorski, Pawel; alsa-devel@alsa-project.org; Firo Yang Subject: [PATCH] ASoC: Intel: fix Coccinelle kfree warning
It's not necessary to use kfree() to free memory allocated with devm_kzalloc in a probe function and using kfree leads to a double free.
Signed-off-by: Firo Yang firogm@gmail.com
sound/soc/intel/haswell/sst-haswell-ipc.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/sound/soc/intel/haswell/sst-haswell-ipc.c b/sound/soc/intel/haswell/sst-haswell-ipc.c index 344a1e9..324eceb 100644 --- a/sound/soc/intel/haswell/sst-haswell-ipc.c +++ b/sound/soc/intel/haswell/sst-haswell-ipc.c @@ -2201,7 +2201,6 @@ dma_err: dsp_new_err: sst_ipc_fini(ipc); ipc_init_err:
- kfree(hsw);
It has been fixed by Jin Yao 2 weeks ago: http://git.kernel.org/cgit/linux/kernel/git/broonie/sound.git/commit/?h=for-...
~Keyon
return ret; } EXPORT_SYMBOL_GPL(sst_hsw_dsp_init); -- 2.1.0