]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
mfd: wcd934x: Drop kfree for memory allocated with devm_kzalloc
authorWei Yongjun <weiyongjun1@huawei.com>
Mon, 27 Apr 2020 12:29:22 +0000 (12:29 +0000)
committerLee Jones <lee.jones@linaro.org>
Tue, 26 May 2020 09:51:21 +0000 (10:51 +0100)
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 <weiyongjun1@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/wcd934x.c

index 90341f3c68101e47452d5a1a69e69ff3d2b40612..da910302d51a2c107bb6db5586d2071f4739262e 100644 (file)
@@ -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[] = {