Commit 652b7b67 authored by Wei Yongjun's avatar Wei Yongjun Committed by Lee Jones

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: 6ac7e4d7 ("mfd: wcd934x: Add support to wcd9340/wcd9341 codec")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 97eda5dc
...@@ -280,7 +280,6 @@ static void wcd934x_slim_remove(struct slim_device *sdev) ...@@ -280,7 +280,6 @@ static void wcd934x_slim_remove(struct slim_device *sdev)
regulator_bulk_disable(WCD934X_MAX_SUPPLY, ddata->supplies); regulator_bulk_disable(WCD934X_MAX_SUPPLY, ddata->supplies);
mfd_remove_devices(&sdev->dev); mfd_remove_devices(&sdev->dev);
kfree(ddata);
} }
static const struct slim_device_id wcd934x_slim_id[] = { static const struct slim_device_id wcd934x_slim_id[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment