From: Riana Tauro <riana.tauro@intel.com>
To: "Gupta, Anshuman" <anshuman.gupta@intel.com>,
"Poosa, Karthik" <karthik.poosa@intel.com>,
"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>
Cc: "Nilawar, Badal" <badal.nilawar@intel.com>
Subject: Re: [PATCH 1/2] drm/xe: Fix static analysis tool reported errors
Date: Fri, 22 Mar 2024 11:50:31 +0530 [thread overview]
Message-ID: <eb736899-1d8d-4203-b2a1-378d28d950f5@intel.com> (raw)
In-Reply-To: <CY5PR11MB6211A336A3E832319D7C98B595312@CY5PR11MB6211.namprd11.prod.outlook.com>
Hi Karthik
On 3/22/2024 11:34 AM, Gupta, Anshuman wrote:
>
>
>> -----Original Message-----
>> From: Poosa, Karthik <karthik.poosa@intel.com>
>> Sent: Thursday, March 21, 2024 4:16 PM
>> To: intel-xe@lists.freedesktop.org
>> Cc: Gupta, Anshuman <anshuman.gupta@intel.com>; Nilawar, Badal
>> <badal.nilawar@intel.com>; Poosa, Karthik <karthik.poosa@intel.com>
>> Subject: [PATCH 1/2] drm/xe: Fix static analysis tool reported errors
>>
>> Add a NULL pointer check.
>>
>> Fixes: 09d88e3beb64 ("drm/xe/pm: Init pcode and restore vram on power lost")
>> Signed-off-by: Karthik Poosa <karthik.poosa@intel.com>
> Reviewed-by: Anshuman Gupta <anshuman.gupta@intel.com>
>> ---
>> drivers/gpu/drm/xe/xe_pm.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c index
>> cc650a92c2fc..5cb5aef16823 100644
>> --- a/drivers/gpu/drm/xe/xe_pm.c
>> +++ b/drivers/gpu/drm/xe/xe_pm.c
>> @@ -383,6 +383,11 @@ 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");
You can just print "gt is NULL"
>> + return -ENXIO;
You need to set err and goto out and release the previous resources
Thanks,
Riana
>> + }
>> +
>> xe->d3cold.power_lost = xe_guc_in_reset(>->uc.guc);
>>
>> if (xe->d3cold.allowed && xe->d3cold.power_lost) {
>> --
>> 2.25.1
>
next prev parent reply other threads:[~2024-03-22 6:20 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-21 10:46 [PATCH 0/2] drm/xe: Fix issues reported by static analysis tool Karthik Poosa
2024-03-21 10:46 ` [PATCH 1/2] drm/xe: Fix static analysis tool reported errors Karthik Poosa
2024-03-22 6:04 ` Gupta, Anshuman
2024-03-22 6:20 ` Riana Tauro [this message]
2024-03-22 6:36 ` Poosa, Karthik
2024-03-21 10:46 ` [PATCH 2/2] drm/xe/hwmon: Fix static analysis tool reported issues Karthik Poosa
2024-03-21 13:00 ` Jani Nikula
2024-03-22 14:14 ` Poosa, Karthik
2024-03-25 9:52 ` Jani Nikula
2024-03-21 11:19 ` ✓ CI.Patch_applied: success for drm/xe: Fix issues reported by static analysis tool Patchwork
2024-03-21 11:20 ` ✓ CI.checkpatch: " Patchwork
2024-03-21 11:20 ` ✓ CI.KUnit: " Patchwork
2024-03-21 11:31 ` ✓ CI.Build: " Patchwork
2024-03-21 11:33 ` ✓ CI.Hooks: " Patchwork
2024-03-21 11:36 ` ✓ CI.checksparse: " Patchwork
2024-03-21 12:01 ` ✓ CI.BAT: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2024-03-22 14:35 [PATCH 0/2] " Karthik Poosa
2024-03-22 14:35 ` [PATCH 1/2] drm/xe: Fix static analysis tool reported errors Karthik Poosa
2024-03-25 17:22 ` Matt Roper
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=eb736899-1d8d-4203-b2a1-378d28d950f5@intel.com \
--to=riana.tauro@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=badal.nilawar@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