drm/amdgpu: Fix memory leak in hpd_rx_irq_create_workqueue()
authorRafael Mendonca <rafaelmendsr@gmail.com>
Mon, 12 Sep 2022 22:34:32 +0000 (19:34 -0300)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 13 Sep 2022 18:33:01 +0000 (14:33 -0400)
commit7136f956c73c4ba50bfeb61653dfd6a9669ea915
treed27908748cfdc21c68385843be3cf15d25c5df4b
parent221bb3a9c34f8004c10ebcd0eda9d74354d519d1
drm/amdgpu: Fix memory leak in hpd_rx_irq_create_workqueue()

If construction of the array of work queues to handle hpd_rx_irq offload
work fails, we need to unwind. Destroy all the created workqueues and
the allocated memory for the hpd_rx_irq_offload_work_queue struct array.

Fixes: 8e794421bc98 ("drm/amd/display: Fork thread to offload work of hpd_rx_irq")
Signed-off-by: Rafael Mendonca <rafaelmendsr@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c