All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Vignesh Chander <Vignesh.Chander@amd.com>, amd-gfx@lists.freedesktop.org
Cc: Shaoyun.Liu@amd.com
Subject: Re: [PATCH] drm/amdgpu: Skip put_reset_domain if it doesnt exist
Date: Wed, 28 Sep 2022 19:44:22 +0200	[thread overview]
Message-ID: <010813c9-d415-45a4-fde9-9c8bf3966ff4@amd.com> (raw)
In-Reply-To: <20220928173733.12457-1-Vignesh.Chander@amd.com>



Am 28.09.22 um 19:37 schrieb Vignesh Chander:
> Change-Id: Ifd6121fb94db3fadaa1dee61d35699abe1259409
> Signed-off-by: Vignesh Chander <Vignesh.Chander@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
> index 47159e9a0884..80fb6ef929e5 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
> @@ -217,7 +217,8 @@ static void amdgpu_xgmi_hive_release(struct kobject *kobj)
>   	struct amdgpu_hive_info *hive = container_of(
>   		kobj, struct amdgpu_hive_info, kobj);
>   
> -	amdgpu_reset_put_reset_domain(hive->reset_domain);
> +	if (hive->reset_domain)
> +		amdgpu_reset_put_reset_domain(hive->reset_domain);

As general coding style rule _put functions are usually NULL pointer 
tolerant. So this shouldn't be necessary.

If that really is necessary then please adjust the 
amdgpu_reset_put_reset_domain() function instead.

Christian.

>   	hive->reset_domain = NULL;
>   
>   	mutex_destroy(&hive->hive_lock);


  parent reply	other threads:[~2022-09-28 17:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-28 17:37 [PATCH] drm/amdgpu: Skip put_reset_domain if it doesnt exist Vignesh Chander
2022-09-28 17:40 ` Hamza Mahfooz
2022-09-28 17:44 ` Christian König [this message]
2022-09-28 17:44 ` Liu, Shaoyun
  -- strict thread matches above, loose matches on Subject: below --
2022-09-28 17:43 Vignesh Chander
2022-09-28 17:45 ` Christian König
2022-09-28 18:11   ` Chander, Vignesh
2022-09-28 18:22 Vignesh Chander
2022-09-28 18:27 ` Christian König
2022-09-28 19:03 Vignesh Chander
2022-09-28 22:02 ` Liu, Shaoyun

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=010813c9-d415-45a4-fde9-9c8bf3966ff4@amd.com \
    --to=christian.koenig@amd.com \
    --cc=Shaoyun.Liu@amd.com \
    --cc=Vignesh.Chander@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    /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.