All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2] drm/xe/display: check for error on drmm_mutex_init
@ 2024-03-28  8:00 Arun R Murthy
  2024-03-28  8:15 ` ✓ CI.Patch_applied: success for drm/xe/display: check for error on drmm_mutex_init (rev3) Patchwork
                   ` (10 more replies)
  0 siblings, 11 replies; 18+ messages in thread
From: Arun R Murthy @ 2024-03-28  8:00 UTC (permalink / raw)
  To: intel-gfx, intel-xe; +Cc: Arun R Murthy

Check return value for drmm_mutex_init as it can fail and return on
failure.

Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
---
 drivers/gpu/drm/xe/display/xe_display.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
index e4db069f0db3..b2f58b3afabe 100644
--- a/drivers/gpu/drm/xe/display/xe_display.c
+++ b/drivers/gpu/drm/xe/display/xe_display.c
@@ -107,12 +107,14 @@ int xe_display_create(struct xe_device *xe)
 
 	xe->display.hotplug.dp_wq = alloc_ordered_workqueue("xe-dp", 0);
 
-	drmm_mutex_init(&xe->drm, &xe->sb_lock);
-	drmm_mutex_init(&xe->drm, &xe->display.backlight.lock);
-	drmm_mutex_init(&xe->drm, &xe->display.audio.mutex);
-	drmm_mutex_init(&xe->drm, &xe->display.wm.wm_mutex);
-	drmm_mutex_init(&xe->drm, &xe->display.pps.mutex);
-	drmm_mutex_init(&xe->drm, &xe->display.hdcp.hdcp_mutex);
+	if (drmm_mutex_init(&xe->drm, &xe->sb_lock) ||
+	    drmm_mutex_init(&xe->drm, &xe->display.backlight.lock) ||
+	    drmm_mutex_init(&xe->drm, &xe->display.audio.mutex) ||
+	    drmm_mutex_init(&xe->drm, &xe->display.wm.wm_mutex) ||
+	    drmm_mutex_init(&xe->drm, &xe->display.pps.mutex) ||
+	    drmm_mutex_init(&xe->drm, &xe->display.hdcp.hdcp_mutex))
+		return -ENOMEM;
+
 	xe->enabled_irq_mask = ~0;
 
 	err = drmm_add_action_or_reset(&xe->drm, display_destroy, NULL);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2024-04-03 15:33 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-28  8:00 [PATCHv2] drm/xe/display: check for error on drmm_mutex_init Arun R Murthy
2024-03-28  8:15 ` ✓ CI.Patch_applied: success for drm/xe/display: check for error on drmm_mutex_init (rev3) Patchwork
2024-03-28  8:15 ` ✓ CI.checkpatch: " Patchwork
2024-03-28  8:16 ` ✓ CI.KUnit: " Patchwork
2024-03-28  8:31 ` [PATCHv2] drm/xe/display: check for error on drmm_mutex_init Andi Shyti
2024-03-28 10:33   ` Jani Nikula
2024-03-28 10:45     ` Andi Shyti
2024-03-28 10:55       ` Murthy, Arun R
2024-03-28 11:07         ` Andi Shyti
2024-03-30 12:05           ` Murthy, Arun R
2024-04-03 15:32     ` Lucas De Marchi
2024-03-28  8:34 ` ✓ CI.Build: success for drm/xe/display: check for error on drmm_mutex_init (rev3) Patchwork
2024-03-28  8:37 ` ✓ CI.Hooks: " Patchwork
2024-03-28  8:38 ` ✓ CI.checksparse: " Patchwork
2024-03-28  9:22 ` ✓ CI.BAT: " Patchwork
2024-03-28 15:23 ` ✓ Fi.CI.BAT: " Patchwork
2024-03-28 17:48 ` ✓ Fi.CI.IGT: " Patchwork
2024-03-28 22:46 ` ✗ Fi.CI.IGT: failure " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.