diff options
author | Yong Zhao <yong.zhao@amd.com> | 2017-12-08 23:08:48 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-22 09:23:29 +0100 |
commit | 7a9a365664c7f05e33bbda8f90f1180dcc202b38 (patch) | |
tree | c47c327450e89f967d9d61a8854d38c59d346e99 /drivers/hid/hid-roccat-kovaplus.c | |
parent | eaea613f64dc2edd9d6c1bc6addd3dc8f49fb140 (diff) |
drm/amdkfd: Fix memory leaks in kfd topology
[ Upstream commit 5108d768408abc80e4e8d99f5b406a73cb04056b ]
Kobject created using kobject_create_and_add() can be freed using
kobject_put() when there is no referenece any more. However,
kobject memory allocated with kzalloc() has to set up a release
callback in order to free it when the counter decreases to 0.
Otherwise it causes memory leak.
Signed-off-by: Yong Zhao <yong.zhao@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hid/hid-roccat-kovaplus.c')
0 files changed, 0 insertions, 0 deletions