From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"David (ChunMing) Zhou" <David1.Zhou@amd.com>,
"David Airlie" <airlied@linux.ie>
Cc: "Gustavo A. R. Silva" <garsilva@embeddedor.com>,
dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/amdgpu_gem: fix error handling path in amdgpu_gem_va_update_vm
Date: Thu, 15 Feb 2018 13:32:36 +0100 [thread overview]
Message-ID: <b3638ffe-b29f-b30b-4a2c-ccc50f7562b0@gmail.com> (raw)
In-Reply-To: <20180215052000.GA25691@embeddedgus>
Am 15.02.2018 um 06:20 schrieb Gustavo A. R. Silva:
> Currently, if amdgpu_vm_bo_update() fails, the returned error
> is being ignored.
>
> Fix this by properly checking _r_ after calling amdgpu_vm_bo_update.
> Also, remove redundant code just before label _error_.
>
> Addresses-Coverity-ID: 1464280 ("Unused value")
> Fixes: 0abc6878fc2d ("drm/amdgpu: update VM PDs after the PTs")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> index e48b4ec..db85fc0 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> @@ -523,12 +523,13 @@ static void amdgpu_gem_va_update_vm(struct amdgpu_device *adev,
> goto error;
>
> if (operation == AMDGPU_VA_OP_MAP ||
> - operation == AMDGPU_VA_OP_REPLACE)
> + operation == AMDGPU_VA_OP_REPLACE) {
> r = amdgpu_vm_bo_update(adev, bo_va, false);
> + if (r)
> + goto error;
> + }
>
> r = amdgpu_vm_update_directories(adev, vm);
> - if (r)
> - goto error;
>
> error:
> if (r && r != -ERESTARTSYS)
next prev parent reply other threads:[~2018-02-15 12:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-15 5:20 [PATCH] drm/amdgpu_gem: fix error handling path in amdgpu_gem_va_update_vm Gustavo A. R. Silva
2018-02-15 12:32 ` Christian König [this message]
2018-02-15 16:11 ` Gustavo A. R. Silva
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=b3638ffe-b29f-b30b-4a2c-ccc50f7562b0@gmail.com \
--to=ckoenig.leichtzumerken@gmail.com \
--cc=David1.Zhou@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=garsilva@embeddedor.com \
--cc=gustavo@embeddedor.com \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox