Skip to content

Commit 652b7b6

Browse files
Wei YongjunLee Jones
authored andcommitted
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: 6ac7e4d ("mfd: wcd934x: Add support to wcd9340/wcd9341 codec") Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Lee Jones <[email protected]>
1 parent 97eda5d commit 652b7b6

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/mfd/wcd934x.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,6 @@ static void wcd934x_slim_remove(struct slim_device *sdev)
280280

281281
regulator_bulk_disable(WCD934X_MAX_SUPPLY, ddata->supplies);
282282
mfd_remove_devices(&sdev->dev);
283-
kfree(ddata);
284283
}
285284

286285
static const struct slim_device_id wcd934x_slim_id[] = {

0 commit comments

Comments
 (0)