aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimal Prasad Ghimiray <[email protected]>2024-03-13 20:35:44 +0530
committerLucas De Marchi <[email protected]>2024-03-14 14:29:38 -0500
commitd58b4ef63b5024993906e74f04fda8220ad4c162 (patch)
tree80b5d4aa83db73bb5e7e0bd3566092acbf3f7574
parent386021394394eccef248dc5eb9c9370240821a8c (diff)
drm/xe: Return if kobj creation is failed
Return after warning regarding kobj creation failure. Fixes: 4ae3aeab32d7 ("drm/xe: Add vram frequency sysfs attributes") Cc: Sujaritha Sundaresan <[email protected]> Cc: Tejas Upadhyay <[email protected]> Cc: Bommu Krishnaiah <[email protected]> Reviewed-by: Tejas Upadhyay <[email protected]> Signed-off-by: Himal Prasad Ghimiray <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Rodrigo Vivi <[email protected]> (cherry picked from commit 989d07ac6bb7d269e975f85e8f683f496faa0380) Signed-off-by: Lucas De Marchi <[email protected]>
-rw-r--r--drivers/gpu/drm/xe/xe_vram_freq.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/xe/xe_vram_freq.c b/drivers/gpu/drm/xe/xe_vram_freq.c
index 079cc283a186..c5f6b5a5d117 100644
--- a/drivers/gpu/drm/xe/xe_vram_freq.c
+++ b/drivers/gpu/drm/xe/xe_vram_freq.c
@@ -111,8 +111,10 @@ void xe_vram_freq_sysfs_init(struct xe_tile *tile)
return;
kobj = kobject_create_and_add("memory", tile->sysfs);
- if (!kobj)
+ if (!kobj) {
drm_warn(&xe->drm, "failed to add memory directory, err: %d\n", -ENOMEM);
+ return;
+ }
err = sysfs_create_group(kobj, &freq_group_attrs);
if (err) {