Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Jonathan Cavitt <jonathan.cavitt@intel.com>,
	intel-gfx@lists.freedesktop.org
Cc: saurabhg.gupta@intel.com, alex.zuo@intel.com, jonathan.cavitt@intel.com
Subject: Re: [PATCH] drm/i915/display: Add default case to mipi_exec_send_packet
Date: Tue, 04 Nov 2025 18:49:20 +0200	[thread overview]
Message-ID: <51c99a4aa0dac4b06746cc61f9518678db3d7674@intel.com> (raw)
In-Reply-To: <20251104164150.16795-2-jonathan.cavitt@intel.com>

On Tue, 04 Nov 2025, Jonathan Cavitt <jonathan.cavitt@intel.com> 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 <jonathan.cavitt@intel.com>

Fixes: 23db1577ce2d ("drm/i915/dsi: log send packet sequence errors")
Reviewed-by: Jani Nikula <jani.nikula@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)

-- 
Jani Nikula, Intel

  reply	other threads:[~2025-11-04 16:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=51c99a4aa0dac4b06746cc61f9518678db3d7674@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=alex.zuo@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jonathan.cavitt@intel.com \
    --cc=saurabhg.gupta@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