mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 13:06:59 +02:00
drm/xe: Return NULL in case of drmm_add_action_or_reset failure
In case of drmm_add_action_or_reset failure return NULL and no need to print warning messages as they will be printed implictly. Cc: Tejas Upadhyay <tejas.upadhyay@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240412181211.1155732-5-himal.prasad.ghimiray@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
This commit is contained in:
parent
22bf0bc04d
commit
6e40f142c5
|
|
@ -520,9 +520,8 @@ kobj_xe_hw_engine_class(struct xe_device *xe, struct kobject *parent, const char
|
|||
err = drmm_add_action_or_reset(&xe->drm, kobj_xe_hw_engine_class_fini,
|
||||
&keclass->base);
|
||||
if (err)
|
||||
drm_warn(&xe->drm,
|
||||
"%s: drmm_add_action_or_reset failed, err: %d\n",
|
||||
__func__, err);
|
||||
return NULL;
|
||||
|
||||
return keclass;
|
||||
}
|
||||
|
||||
|
|
@ -553,13 +552,8 @@ static int xe_add_hw_engine_class_defaults(struct xe_device *xe,
|
|||
if (err)
|
||||
goto err_object;
|
||||
|
||||
err = drmm_add_action_or_reset(&xe->drm, hw_engine_class_defaults_fini,
|
||||
kobj);
|
||||
if (err)
|
||||
drm_warn(&xe->drm,
|
||||
"%s: drmm_add_action_or_reset failed, err: %d\n",
|
||||
__func__, err);
|
||||
return err;
|
||||
return drmm_add_action_or_reset(&xe->drm, hw_engine_class_defaults_fini, kobj);
|
||||
|
||||
err_object:
|
||||
kobject_put(kobj);
|
||||
return err;
|
||||
|
|
@ -708,14 +702,8 @@ int xe_hw_engine_class_sysfs_init(struct xe_gt *gt)
|
|||
goto err_object;
|
||||
}
|
||||
|
||||
err = drmm_add_action_or_reset(&xe->drm, hw_engine_class_sysfs_fini,
|
||||
kobj);
|
||||
if (err)
|
||||
drm_warn(&xe->drm,
|
||||
"%s: drmm_add_action_or_reset failed, err: %d\n",
|
||||
__func__, err);
|
||||
return drmm_add_action_or_reset(&xe->drm, hw_engine_class_sysfs_fini, kobj);
|
||||
|
||||
return err;
|
||||
err_object:
|
||||
kobject_put(kobj);
|
||||
return err;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user