From: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
To: christian.koenig@amd.com,
"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
Alex Deucher <alexander.deucher@amd.com>,
"David (ChunMing) Zhou" <David1.Zhou@amd.com>,
David Airlie <airlied@linux.ie>
Cc: 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 10:11:40 -0600 [thread overview]
Message-ID: <fcd63cde-c593-32d5-5b7a-0ffd0a602bb3@embeddedor.com> (raw)
In-Reply-To: <b3638ffe-b29f-b30b-4a2c-ccc50f7562b0@gmail.com>
On 02/15/2018 06:32 AM, Christian König wrote:
> 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>
>
Thanks, Christian
--
Gustavo
>> ---
>> 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)
>
prev parent reply other threads:[~2018-02-15 16:11 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
2018-02-15 16:11 ` Gustavo A. R. Silva [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=fcd63cde-c593-32d5-5b7a-0ffd0a602bb3@embeddedor.com \
--to=garsilva@embeddedor.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=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