Skip to contentSkip to conversation

ASoC: Intel: Remove invalid kfree of devm allocated data

PATCH In review Jin Yao 2 participants 2 messages Apr 13, 2015 – Apr 15, 2015

Subsystems (3)
lore
Share & tools
lore

Jin Yao

author
#0 lore raw

PATCH 1/1 ASoC: Intel: Remove invalid kfree of devm allocated data

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.

---
 sound/soc/intel/haswell/sst-haswell-ipc.c | 1 -
 1 file changed, 1 deletion(-)
sound/soc/intel/haswell/sst-haswell-ipc.c +0 -1
index 344a1e9..324eceb 100644
@@ -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);
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 3 lines · 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"

Appied, thanks.