summaryrefslogtreecommitdiff
path: root/arch/mips/kernel/smp-cmp.c
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2022-11-04 06:39:44 +0300
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2022-11-22 15:09:04 +0300
commit5822e8cc84ee37338ab0bdc3124f6eec04dc232d (patch)
tree14abeaebae6e24c62bf2ad9b6183963b2d8c6a2e /arch/mips/kernel/smp-cmp.c
parent0e2e12166238e25cb2b907a6e591107d9dc363f9 (diff)
downloadlinux-5822e8cc84ee37338ab0bdc3124f6eec04dc232d.tar.xz
MIPS: vpe-mt: fix possible memory leak while module exiting
Afer commit 1fa5ae857bb1 ("driver core: get rid of struct device's bus_id string array"), the name of device is allocated dynamically, it need be freed when module exiting, call put_device() to give up reference, so that it can be freed in kobject_cleanup() when the refcount hit to 0. The vpe_device is static, so remove kfree() from vpe_device_release(). Fixes: 1fa5ae857bb1 ("driver core: get rid of struct device's bus_id string array") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'arch/mips/kernel/smp-cmp.c')
0 files changed, 0 insertions, 0 deletions