mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: zhoucm1 <zhoucm1@amd.com>
To: Wei Yongjun <weiyongjun1@huawei.com>, <alexander.deucher@amd.com>,
	<christian.koenig@amd.com>, <David1.Zhou@amd.com>,
	<airlied@linux.ie>, <Rex.Zhu@amd.com>, <Monk.Liu@amd.com>
Cc: <amd-gfx@lists.freedesktop.org>,
	<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
	<kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH -next] drm/amdgpu: Fix return value check in amdgpu_allocate_static_csa()
Date: Tue, 4 Dec 2018 14:39:52 +0800	[thread overview]
Message-ID: <fc2e78a7-d739-6e53-864b-75080e124585@amd.com> (raw)
In-Reply-To: <1543905576-38015-1-git-send-email-weiyongjun1@huawei.com>



On 2018年12月04日 14:39, Wei Yongjun wrote:
> Fix the return value check which testing the wrong variable
> in amdgpu_allocate_static_csa().
>
> Fixes: 7946340fa389 ("drm/amdgpu: Move csa related code to separate file")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c
> index 0c590dd..a5fbc6f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c
> @@ -43,7 +43,7 @@ int amdgpu_allocate_static_csa(struct amdgpu_device *adev, struct amdgpu_bo **bo
>   	r = amdgpu_bo_create_kernel(adev, size, PAGE_SIZE,
>   				domain, bo,
>   				NULL, &ptr);
> -	if (!bo)
> +	if (!r)
>   		return -ENOMEM;
I guess original is correct as well, if you want to change it, you can 
make like below, not your 'if (!r)':
                 if (r)
                         return r;

-David
>   
>   	memset(ptr, 0, size);
>
>
>


      reply	other threads:[~2018-12-04  6:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-04  6:39 Wei Yongjun
2018-12-04  6:39 ` zhoucm1 [this message]

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=fc2e78a7-d739-6e53-864b-75080e124585@amd.com \
    --to=zhoucm1@amd.com \
    --cc=David1.Zhou@amd.com \
    --cc=Monk.Liu@amd.com \
    --cc=Rex.Zhu@amd.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=weiyongjun1@huawei.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

all inboxes | Powered by JetHome®