drm/amdkfd: Fix reference count leaks.
authorQiushi Wu <wu000273@umn.edu>
Sat, 13 Jun 2020 19:32:26 +0000 (14:32 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Jul 2020 05:59:21 +0000 (01:59 -0400)
commit20eca0123a35305e38b344d571cf32768854168c
tree241cedaf49dc98edfa15263014b88ea2372fae09
parentb205795677c034a1975e75a466ad158950fde4b4
drm/amdkfd: Fix reference count leaks.

kobject_init_and_add() takes reference even when it fails.
If this function returns an error, kobject_put() must be called to
properly clean up the memory associated with the object.

Signed-off-by: Qiushi Wu <wu000273@umn.edu>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_topology.c