Skip to content
Commit 6b6cf2b5 authored by Dmitry Osipenko's avatar Dmitry Osipenko Committed by Lee Jones
Browse files

mfd: core: Fix double-free in mfd_remove_devices_fn()

The pdev.mfd_cell is released by platform_device_release(), which is
invoked by platform_device_unregister(). Hence mfd_remove_devices_fn()
shouldn't release the cell variable. The double-free bug is reported KASAN
during of MFD driver module removal.

Fixes: 466a62d7

 ("mfd: core: Make a best effort attempt to match devices with the correct of_nodes")
Reported-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: default avatarDmitry Osipenko <digetx@gmail.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 9123e3a7
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