drm/i915/display: Add check for alloc_ordered_workqueue() and alloc_workqueue()
authorHaoxiang Li <haoxiang_li2024@163.com>
Fri, 16 May 2025 12:16:54 +0000 (15:16 +0300)
committerJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Thu, 22 May 2025 06:25:57 +0000 (09:25 +0300)
commitf4c7baa0699b69edb6887a992283b389761e0e81
tree1894ca022ec737a8e243db88305b667c01ab1653
parent9cb15478916e849d62a6ec44b10c593b9663328c
drm/i915/display: Add check for alloc_ordered_workqueue() and alloc_workqueue()

Add check for the return value of alloc_ordered_workqueue()
and alloc_workqueue(). Furthermore, if some allocations fail,
cleanup works are added to avoid potential memory leak problem.

Fixes: 40053823baad ("drm/i915/display: move modeset probe/remove functions to intel_display_driver.c")
Cc: stable@vger.kernel.org
Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://lore.kernel.org/r/20d3d096c6a4907636f8a1389b3b4dd753ca356e.1747397638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
(cherry picked from commit dcab7a228f4ea9cda3f5b0a1f0679e046d23d7f7)
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
drivers/gpu/drm/i915/display/intel_display_driver.c