drm/amdkfd: Set priv_queue to NULL after it is freed
authorOak Zeng <Oak.Zeng@amd.com>
Thu, 15 Jul 2021 22:02:46 +0000 (17:02 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 23 Jul 2021 14:08:00 +0000 (10:08 -0400)
This variable will be used to determine whether packet
manager is initialized or not, in a future patch.

Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
Acked-by: Christian Konig <christian.koenig@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c

index d8e940f..b130cc0 100644 (file)
@@ -278,6 +278,7 @@ void pm_uninit(struct packet_manager *pm, bool hanging)
 {
        mutex_destroy(&pm->lock);
        kernel_queue_uninit(pm->priv_queue, hanging);
+       pm->priv_queue = NULL;
 }
 
 int pm_send_set_resources(struct packet_manager *pm,