Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe: Check result of drmm_mutex_init()
@ 2024-04-09 15:31 Michal Wajdeczko
  2024-04-09 15:37 ` Ghimiray, Himal Prasad
                   ` (9 more replies)
  0 siblings, 10 replies; 14+ messages in thread
From: Michal Wajdeczko @ 2024-04-09 15:31 UTC (permalink / raw)
  To: intel-xe

Although it's unlikely that drmm_mutex_init() will fail during
driver initialization, however we shouldn't ignore this case.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
---
 drivers/gpu/drm/xe/xe_device.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index 9083f5e02dd9..ba3643906d9e 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -273,7 +273,9 @@ struct xe_device *xe_device_create(struct pci_dev *pdev,
 
 	init_waitqueue_head(&xe->ufence_wq);
 
-	drmm_mutex_init(&xe->drm, &xe->usm.lock);
+	err = drmm_mutex_init(&xe->drm, &xe->usm.lock);
+	if (err)
+		goto err;
 	xa_init_flags(&xe->usm.asid_to_vm, XA_FLAGS_ALLOC);
 
 	if (IS_ENABLED(CONFIG_DRM_XE_DEBUG)) {
-- 
2.43.0


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

end of thread, other threads:[~2024-04-24 22:39 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-09 15:31 [PATCH] drm/xe: Check result of drmm_mutex_init() Michal Wajdeczko
2024-04-09 15:37 ` Ghimiray, Himal Prasad
2024-04-09 15:39 ` ✓ CI.Patch_applied: success for " Patchwork
2024-04-09 15:39 ` ✓ CI.checkpatch: " Patchwork
2024-04-09 15:40 ` ✓ CI.KUnit: " Patchwork
2024-04-09 15:52 ` ✓ CI.Build: " Patchwork
2024-04-09 15:56 ` ✓ CI.Hooks: " Patchwork
2024-04-09 15:58 ` ✓ CI.checksparse: " Patchwork
2024-04-09 16:20 ` ✓ CI.BAT: " Patchwork
2024-04-09 17:22 ` ✗ CI.FULL: failure " Patchwork
2024-04-09 18:01 ` [PATCH] " Lucas De Marchi
2024-04-10  4:28   ` Ghimiray, Himal Prasad
2024-04-10 13:50     ` Lucas De Marchi
2024-04-24 22:38       ` Lucas De Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox