From: "Nilawar, Badal" <badal.nilawar@intel.com>
To: Karthik Poosa <karthik.poosa@intel.com>,
<intel-xe@lists.freedesktop.org>
Cc: <anshuman.gupta@intel.com>
Subject: Re: [PATCH] drm/xe: Fix static analysis tool reported errors
Date: Sat, 23 Mar 2024 10:37:02 +0530 [thread overview]
Message-ID: <5d411e4c-4b00-4b19-8415-0a6e57eac060@intel.com> (raw)
In-Reply-To: <20240323044822.2632787-1-karthik.poosa@intel.com>
On 23-03-2024 10:18, Karthik Poosa wrote:
> Add a NULL pointer check.
> Release resources before returning error. (Riana).
Put this as v2: Release resources before returning error. (Riana).
>
> Fixes: 09d88e3beb64 ("drm/xe/pm: Init pcode and restore vram on power lost")
> Signed-off-by: Karthik Poosa <karthik.poosa@intel.com>
> ---
> drivers/gpu/drm/xe/xe_pm.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
> index cc650a92c2fc..46abf63bc37b 100644
> --- a/drivers/gpu/drm/xe/xe_pm.c
> +++ b/drivers/gpu/drm/xe/xe_pm.c
> @@ -383,6 +383,12 @@ int xe_pm_runtime_resume(struct xe_device *xe)
> * really lost power. Detecting primary Gt power is sufficient.
> */
> gt = xe_device_get_gt(xe, 0);
> + if (!gt) {
> + drm_err(&xe->drm, "xe_gt pointer NULL in xe_device\n");
> + err = -ENXIO;
> + goto out;
> + }
> +
> xe->d3cold.power_lost = xe_guc_in_reset(>->uc.guc);
>
> if (xe->d3cold.allowed && xe->d3cold.power_lost) {
With a comment this is
Reviewed-by: Badal Nilawar <badal.nilawar@intel.com>
next prev parent reply other threads:[~2024-03-23 5:07 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-23 4:48 [PATCH] drm/xe: Fix static analysis tool reported errors Karthik Poosa
2024-03-23 4:45 ` ✓ CI.Patch_applied: success for " Patchwork
2024-03-23 4:45 ` ✓ CI.checkpatch: " Patchwork
2024-03-23 4:46 ` ✓ CI.KUnit: " Patchwork
2024-03-23 4:57 ` ✓ CI.Build: " Patchwork
2024-03-23 4:59 ` ✓ CI.Hooks: " Patchwork
2024-03-23 5:01 ` ✓ CI.checksparse: " Patchwork
2024-03-23 5:07 ` Nilawar, Badal [this message]
2024-03-23 5:28 ` ✓ CI.BAT: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2024-03-23 10:53 [PATCH] " Karthik Poosa
2024-03-24 4:00 ` Gupta, Anshuman
2024-03-23 12:13 Karthik Poosa
2024-03-25 3:53 Karthik Poosa
2024-03-25 6:18 ` Riana Tauro
2024-03-25 8:05 Karthik Poosa
2024-03-25 9:44 ` Jani Nikula
2024-03-25 9:45 ` Jani Nikula
2024-03-25 12:00 ` Riana Tauro
2024-03-25 13:29 ` Nilawar, Badal
2024-03-25 13:39 ` Poosa, Karthik
2024-03-25 13:55 ` Poosa, Karthik
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=5d411e4c-4b00-4b19-8415-0a6e57eac060@intel.com \
--to=badal.nilawar@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=karthik.poosa@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