-----Original Message----- From: Firo Yang [mailto:firogm@gmail.com] Sent: Monday, April 27, 2015 3:42 PM To: Jie, Yang Cc: lgirdwood@gmail.com; kernel-janitors@vger.kernel.org; broonie@kernel.org; perex@perex.cz; tiwai@suse.de; Lu, Han; jarkko.nikula@linux.intel.com; Piskorski, Pawel; alsa-devel@alsa-project.org; Jin, Yao Subject: Re: [PATCH] ASoC: Intel: fix Coccinelle kfree warning
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?
I guess so. You can refer to the for-next branch of git repo to confirm it: git://git.kernel.org/cgit/linux/kernel/git/broonie/sound.git
~Keyon
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-next&id=ac98b4c015b50b1e452f8d55b612320be7f80825
~Keyon
return ret; } EXPORT_SYMBOL_GPL(sst_hsw_dsp_init); -- 2.1.0