Message ID | 20250219130800.2638016-1-haoxiang_li2024@163.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | drm/i915/display: Add check for alloc_ordered_workqueue() and alloc_workqueue() | expand |
diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c index 50ec0c3c7588..dfe5b779aefd 100644 --- a/drivers/gpu/drm/i915/display/intel_display_driver.c +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c @@ -245,6 +245,11 @@ int intel_display_driver_probe_noirq(struct intel_display *display) WQ_UNBOUND, WQ_UNBOUND_MAX_ACTIVE); display->wq.cleanup = alloc_workqueue("i915_cleanup", WQ_HIGHPRI, 0); + if (!display->wq.modeset || !display->wq.flip || !display->wq.cleanup) { + ret = -ENOMEM; + goto cleanup_vga_client_pw_domain_dmc; + } + intel_mode_config_init(display); ret = intel_cdclk_init(display);
Add check for the return value of alloc_ordered_workqueue() and alloc_workqueue() to catch potential exception. 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> --- drivers/gpu/drm/i915/display/intel_display_driver.c | 5 +++++ 1 file changed, 5 insertions(+)