Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>,
	Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>,
	Tejas Upadhyay <tejas.upadhyay@intel.com>,
	Bommu Krishnaiah <krishnaiah.bommu@intel.com>
Subject: [PATCH 1/3] drm/xe: Return if kobj creation is failed
Date: Fri,  8 Mar 2024 10:06:49 +0530	[thread overview]
Message-ID: <20240308043651.2010165-2-himal.prasad.ghimiray@intel.com> (raw)
In-Reply-To: <20240308043651.2010165-1-himal.prasad.ghimiray@intel.com>

Return after warning regarding kobj creation failure.

Fixes: 4ae3aeab32d7 ("drm/xe: Add vram frequency sysfs attributes")
Cc: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
Cc: Tejas Upadhyay <tejas.upadhyay@intel.com>
Cc: Bommu Krishnaiah <krishnaiah.bommu@intel.com>
Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
---
 drivers/gpu/drm/xe/xe_vram_freq.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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) {
-- 
2.25.1


  parent reply	other threads:[~2024-03-08  4:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-08  4:36 [PATCH 0/3] Minor fixes for errors reported by static analyzer Himal Prasad Ghimiray
2024-03-08  4:33 ` ✓ CI.Patch_applied: success for " Patchwork
2024-03-08  4:33 ` ✓ CI.checkpatch: " Patchwork
2024-03-08  4:35 ` ✓ CI.KUnit: " Patchwork
2024-03-08  4:36 ` Himal Prasad Ghimiray [this message]
2024-03-08  5:18   ` [PATCH 1/3] drm/xe: Return if kobj creation is failed Upadhyay, Tejas
2024-03-08  4:36 ` [PATCH 2/3] drm/xe/vf: Remove lmtt->ops null check in xe_lmtt_estimate_pt_size Himal Prasad Ghimiray
2024-03-08 14:52   ` Rodrigo Vivi
2024-03-08 16:22     ` Ghimiray, Himal Prasad
2024-03-11 13:13       ` Michal Wajdeczko
2024-03-11 14:21         ` Lucas De Marchi
2024-03-08  4:36 ` [PATCH 3/3] drm/xe/xe_exec : In xe_exec_ioctl remove deadcode Himal Prasad Ghimiray
2024-03-08  5:27   ` Upadhyay, Tejas
2024-03-08  4:46 ` ✓ CI.Build: success for Minor fixes for errors reported by static analyzer Patchwork
2024-03-08  4:46 ` ✗ CI.Hooks: failure " Patchwork
2024-03-08  4:48 ` ✓ CI.checksparse: success " Patchwork
2024-03-08  5:38 ` ✓ CI.BAT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240308043651.2010165-2-himal.prasad.ghimiray@intel.com \
    --to=himal.prasad.ghimiray@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=krishnaiah.bommu@intel.com \
    --cc=sujaritha.sundaresan@intel.com \
    --cc=tejas.upadhyay@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox