mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-16 04:27:57 -05:00
drm/xe/tile: Release kobject for the failure path
Call kobject_put() for the failure path to release the kobject
v2: remove extra newline. (Matt)
Fixes: e3d0839aa5 ("drm/xe/tile: Abort driver load for sysfs creation failure")
Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
Link: https://lore.kernel.org/r/20250819153950.2973344-2-shuicheng.lin@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
This commit is contained in:
committed by
Lucas De Marchi
parent
844150c255
commit
b98775bca9
@@ -44,16 +44,18 @@ int xe_tile_sysfs_init(struct xe_tile *tile)
|
||||
kt->tile = tile;
|
||||
|
||||
err = kobject_add(&kt->base, &dev->kobj, "tile%d", tile->id);
|
||||
if (err) {
|
||||
kobject_put(&kt->base);
|
||||
return err;
|
||||
}
|
||||
if (err)
|
||||
goto err_object;
|
||||
|
||||
tile->sysfs = &kt->base;
|
||||
|
||||
err = xe_vram_freq_sysfs_init(tile);
|
||||
if (err)
|
||||
return err;
|
||||
goto err_object;
|
||||
|
||||
return devm_add_action_or_reset(xe->drm.dev, tile_sysfs_fini, tile);
|
||||
|
||||
err_object:
|
||||
kobject_put(&kt->base);
|
||||
return err;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user