Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/display: Add default case to mipi_exec_send_packet
@ 2025-11-04 16:41 Jonathan Cavitt
  2025-11-04 16:49 ` Jani Nikula
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jonathan Cavitt @ 2025-11-04 16:41 UTC (permalink / raw)
  To: intel-gfx; +Cc: saurabhg.gupta, alex.zuo, jonathan.cavitt

Add a default case to the switch case statement in mipi_exec_send_packet
to prevent attempts to read an uninitialized ret value.  It's unlikely
the default case will ever occur during regular exeuction, but if more
MIPI DSI Processor-to-Peripheral transaction types are ever added, then
having this in place will be a useful safety guard.

Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c b/drivers/gpu/drm/i915/display/intel_dsi_vbt.c
index 31edf57a296f..4b815ce6b1fe 100644
--- a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c
+++ b/drivers/gpu/drm/i915/display/intel_dsi_vbt.c
@@ -171,6 +171,9 @@ static const u8 *mipi_exec_send_packet(struct intel_dsi *intel_dsi,
 	case MIPI_DSI_DCS_LONG_WRITE:
 		ret = mipi_dsi_dcs_write_buffer(dsi_device, data, len);
 		break;
+	default:
+		ret = -EINVAL;
+		break;
 	}
 
 	if (ret < 0)
-- 
2.43.0


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

end of thread, other threads:[~2025-11-13 10:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-04 16:41 [PATCH] drm/i915/display: Add default case to mipi_exec_send_packet Jonathan Cavitt
2025-11-04 16:49 ` Jani Nikula
2025-11-13 10:19   ` Jani Nikula
2025-11-05  3:00 ` ✓ i915.CI.BAT: success for " Patchwork
2025-11-06 14:02 ` ✓ i915.CI.Full: " Patchwork

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