Skip to content

Commit

Permalink
drm/xe: Check result of drmm_mutex_init()
Browse files Browse the repository at this point in the history
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>
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240409153132.1111-1-michal.wajdeczko@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
  • Loading branch information
Michal Wajdeczko authored and Lucas De Marchi committed Apr 24, 2024
1 parent b5ef808 commit cbf7579
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/gpu/drm/xe/xe_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,10 @@ 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)) {
Expand Down

0 comments on commit cbf7579

Please sign in to comment.