All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: Intel: Remove invalid kfree of devm allocated data
@ 2015-04-13  6:20 Jin Yao
  2015-04-15 16:06 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Jin Yao @ 2015-04-13  6:20 UTC (permalink / raw)
  To: broonie, liam.r.girdwood; +Cc: alsa-devel, Jin Yao

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>
---
 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);
 	return ret;
 }
 EXPORT_SYMBOL_GPL(sst_hsw_dsp_init);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: Intel: Remove invalid kfree of devm allocated data
  2015-04-13  6:20 [PATCH] ASoC: Intel: Remove invalid kfree of devm allocated data Jin Yao
@ 2015-04-15 16:06 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2015-04-15 16:06 UTC (permalink / raw)
  To: Jin Yao; +Cc: alsa-devel, liam.r.girdwood


[-- Attachment #1.1: Type: text/plain, Size: 221 bytes --]

On Mon, Apr 13, 2015 at 02:20:54PM +0800, Jin Yao wrote:
> kbuild robot reports following warning:
> "sound/soc/intel/haswell/sst-haswell-ipc.c:2204:1-6:
>  WARNING: invalid free of devm_ allocated data"

Appied, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-04-15 16:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-13  6:20 [PATCH] ASoC: Intel: Remove invalid kfree of devm allocated data Jin Yao
2015-04-15 16:06 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.