Skip to content

Commit

Permalink
mfd: wcd934x: Drop kfree for memory allocated with devm_kzalloc
Browse files Browse the repository at this point in the history
It's not necessary to free memory allocated with devm_kzalloc
and using kfree leads to a double free.

Fixes: 6ac7e4d ("mfd: wcd934x: Add support to wcd9340/wcd9341 codec")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
  • Loading branch information
Wei Yongjun authored and Lee Jones committed May 26, 2020
1 parent 97eda5d commit 652b7b6
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/mfd/wcd934x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = {
Expand Down

0 comments on commit 652b7b6

Please sign in to comment.