Commit cbf75793 authored by Michal Wajdeczko's avatar Michal Wajdeczko Committed by Lucas De Marchi

drm/xe: Check result of drmm_mutex_init()

Although it's unlikely that drmm_mutex_init() will fail during
driver initialization, however we shouldn't ignore this case.
Signed-off-by: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: default avatarHimal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240409153132.1111-1-michal.wajdeczko@intel.comSigned-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
parent b5ef8087
...@@ -274,7 +274,10 @@ struct xe_device *xe_device_create(struct pci_dev *pdev, ...@@ -274,7 +274,10 @@ struct xe_device *xe_device_create(struct pci_dev *pdev,
init_waitqueue_head(&xe->ufence_wq); 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); xa_init_flags(&xe->usm.asid_to_vm, XA_FLAGS_ALLOC);
if (IS_ENABLED(CONFIG_DRM_XE_DEBUG)) { if (IS_ENABLED(CONFIG_DRM_XE_DEBUG)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment