Thread (6 messages) 6 messages, 3 authors, 2020-08-27

Re: [PATCH 1/2] ASoC: fsl: imx-es8328: add missing kfree() call in imx_es8328_probe()

From: yukuai (C) <hidden>
Date: 2020-08-25 12:57:30
Also in: alsa-devel, linux-arm-kernel, lkml

On 2020/08/25 20:11, Mark Brown wrote:
On Tue, Aug 25, 2020 at 08:05:30PM +0800, Yu Kuai wrote:
quoted
If memory allocation for 'data' or 'comp' succeed, imx_es8328_probe()
doesn't have corresponding kfree() in exception handling. Thus add
kfree() for this function implementation.
quoted
@@ -151,7 +151,7 @@ static int imx_es8328_probe(struct platform_device *pdev)
  	comp = devm_kzalloc(dev, 3 * sizeof(*comp), GFP_KERNEL);
  	if (!comp) {
The allocation is being done using devm_ which means no explicit kfree()
is needed, the allocation will be automatically unwound when the device
is unbound.
Hi,

Thanks for pointing it out, I'll remove this patch.

Best regards,
Yu Kuai
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help