On Tue, 04 Nov 2025, Jani Nikula <[email protected]> wrote: > On Tue, 04 Nov 2025, Jonathan Cavitt <[email protected]> wrote: >> 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 <[email protected]> > > Fixes: 23db1577ce2d ("drm/i915/dsi: log send packet sequence errors") > Reviewed-by: Jani Nikula <[email protected]>
Fell between the cracks a bit, but pushed now. Thanks for the patch. > >> --- >> 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) -- Jani Nikula, Intel
