Skip to content

Commit b84befa

Browse files
Jonathan-Cavittjnikula
authored andcommitted
drm/i915/display: Add default case to mipi_exec_send_packet
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> Fixes: 23db157 ("drm/i915/dsi: log send packet sequence errors") Reviewed-by: Jani Nikula <jani.nikula@intel.com> Link: https://patch.msgid.link/20251104164150.16795-2-jonathan.cavitt@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
1 parent 38759cc commit b84befa

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/gpu/drm/i915/display/intel_dsi_vbt.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ static const u8 *mipi_exec_send_packet(struct intel_dsi *intel_dsi,
171171
case MIPI_DSI_DCS_LONG_WRITE:
172172
ret = mipi_dsi_dcs_write_buffer(dsi_device, data, len);
173173
break;
174+
default:
175+
ret = -EINVAL;
176+
break;
174177
}
175178

176179
if (ret < 0)

0 commit comments

Comments
 (0)