mfd: wcd934x: Drop kfree for memory allocated with devm_kzalloc
Subsystems (2)
PATCH 1/1 mfd: wcd934x: Drop kfree for memory allocated with devm_kzalloc
It's not necessary to free memory allocated with devm_kzalloc and using kfree leads to a double free.
Signed-off-by Wei Yongjun <[email protected]>
--- drivers/mfd/wcd934x.c | 1 - 1 file changed, 1 deletion(-)
drivers/mfd/wcd934x.c +0 -1
@@ -280,7 +280,6 @@ static void wcd934x_slim_remove(struct slim_device *sdev)regulator_bulk_disable (WCD934X_MAX_SUPPLY , ddata->supplies);mfd_remove_devices (&sdev->dev); -kfree (ddata); }static const struct slim_device_id wcd934x_slim_id[] = {
PATCH 1/1 mfd: wcd934x: Drop kfree for memory allocated with devm_kzalloc
It's not necessary to free memory allocated with devm_kzalloc and using kfree leads to a double free.
Fixes 6ac7e4d7ad70 ("mfd: wcd934x: Add support to wcd9340/wcd9341 codec")
Signed-off-by Wei Yongjun <[email protected]>
--- drivers/mfd/wcd934x.c | 1 - 1 file changed, 1 deletion(-)
drivers/mfd/wcd934x.c +0 -1
@@ -280,7 +280,6 @@ static void wcd934x_slim_remove(struct slim_device *sdev)regulator_bulk_disable (WCD934X_MAX_SUPPLY , ddata->supplies);mfd_remove_devices (&sdev->dev); -kfree (ddata); }static const struct slim_device_id wcd934x_slim_id[] = {
Lee Jones
AppliedQuoted 8 lines · Wei Yongjun
It's not necessary to free memory allocated with
devm_kzallocand using kfree leads to a double free.Fixes 6ac7e4d7ad70 ("mfd: wcd934x: Add support to wcd9340/wcd9341 codec")Signed-off-by Wei Yongjun <[email protected]>--- drivers/mfd/wcd934x.c | 1 - 1 file changed, 1 deletion(-)
Applied, thanks.
Signature · 4 lines
Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog