All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Suraj Kandpal <suraj.kandpal@intel.com>,
	intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Cc: uma.shankar@intel.com, chaitanya.kumar.borah@intel.com,
	Suraj Kandpal <suraj.kandpal@intel.com>
Subject: Re: [PATCH] drm/i915/dmc: Add dmc null check
Date: Wed, 09 Oct 2024 12:31:29 +0300	[thread overview]
Message-ID: <8734l5bp1q.fsf@intel.com> (raw)
In-Reply-To: <20241009065434.1799459-2-suraj.kandpal@intel.com>

On Wed, 09 Oct 2024, Suraj Kandpal <suraj.kandpal@intel.com> wrote:
> 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))

See what this does.

BR,
Jani.

>  		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;

-- 
Jani Nikula, Intel

  parent reply	other threads:[~2024-10-09  9:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-09  6:54 [PATCH] drm/i915/dmc: Add dmc null check Suraj Kandpal
2024-10-09  8:16 ` ✓ Fi.CI.BAT: success for " Patchwork
2024-10-09  9:20 ` ✓ CI.Patch_applied: " Patchwork
2024-10-09  9:21 ` ✓ CI.checkpatch: " Patchwork
2024-10-09  9:22 ` ✓ CI.KUnit: " Patchwork
2024-10-09  9:31 ` Jani Nikula [this message]
2024-10-09 10:47   ` [PATCH] " 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
2024-10-10  8:46 ` ✗ Fi.CI.IGT: " 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=8734l5bp1q.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=chaitanya.kumar.borah@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=suraj.kandpal@intel.com \
    --cc=uma.shankar@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.