Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/dmc: Add dmc null check
@ 2024-10-09  6:54 Suraj Kandpal
  2024-10-09  9:20 ` ✓ CI.Patch_applied: success for " Patchwork
                   ` (8 more replies)
  0 siblings, 9 replies; 11+ messages in thread
From: Suraj Kandpal @ 2024-10-09  6:54 UTC (permalink / raw)
  To: intel-xe, intel-gfx; +Cc: uma.shankar, chaitanya.kumar.borah, Suraj Kandpal

Add dmc null check before dereferncing to get the major and minor
version.

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dmc.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dmc.c b/drivers/gpu/drm/i915/display/intel_dmc.c
index 48bbbf8f312c..8c193de0e253 100644
--- a/drivers/gpu/drm/i915/display/intel_dmc.c
+++ b/drivers/gpu/drm/i915/display/intel_dmc.c
@@ -1263,8 +1263,9 @@ static int intel_dmc_debugfs_status_show(struct seq_file *m, void *unused)
 	if (!intel_dmc_has_payload(display))
 		goto out;
 
-	seq_printf(m, "version: %d.%d\n", DMC_VERSION_MAJOR(dmc->version),
-		   DMC_VERSION_MINOR(dmc->version));
+	if (dmc)
+		seq_printf(m, "version: %d.%d\n", DMC_VERSION_MAJOR(dmc->version),
+			   DMC_VERSION_MINOR(dmc->version));
 
 	if (DISPLAY_VER(display) >= 12) {
 		i915_reg_t dc3co_reg;
-- 
2.43.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-10-09 15:18 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-09  6:54 [PATCH] drm/i915/dmc: Add dmc null check Suraj Kandpal
2024-10-09  9:20 ` ✓ CI.Patch_applied: success for " Patchwork
2024-10-09  9:21 ` ✓ CI.checkpatch: " Patchwork
2024-10-09  9:22 ` ✓ CI.KUnit: " Patchwork
2024-10-09  9:31 ` [PATCH] " Jani Nikula
2024-10-09 10:47   ` Kandpal, Suraj
2024-10-09  9:33 ` ✓ CI.Build: success for " Patchwork
2024-10-09  9:36 ` ✓ CI.Hooks: " Patchwork
2024-10-09  9:37 ` ✗ CI.checksparse: warning " Patchwork
2024-10-09  9:55 ` ✓ CI.BAT: success " Patchwork
2024-10-09 15:18 ` ✗ CI.FULL: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox