]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdkfd: Fix goto usage v2
authorKent Russell <kent.russell@amd.com>
Wed, 16 Aug 2017 03:00:07 +0000 (23:00 -0400)
committerOded Gabbay <oded.gabbay@gmail.com>
Wed, 16 Aug 2017 03:00:07 +0000 (23:00 -0400)
commit85c7f8e8354b9b09a054f94f4cd05b899ff3c1c8
treedafd848eab599c334f131167871ba9d83381ff0b
parentd91775308322f3d47807eb819bc26ad1bf3141ad
drm/amdkfd: Fix goto usage v2

Remove gotos that do not feature any common cleanup, and use gotos
instead of repeating cleanup commands.

According to kernel.org: "The goto statement comes in handy when a
function exits from multiple locations and some common work such as
cleanup has to be done. If there is no cleanup needed then just return
directly."

v2: Applied review suggestions in create_queue_nocpsch

Signed-off-by: Kent Russell <kent.russell@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>
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
drivers/gpu/drm/amd/amdkfd/kfd_module.c
drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c