Received: by 10.223.185.116 with SMTP id b49csp1963953wrg; Thu, 15 Feb 2018 04:33:33 -0800 (PST) X-Google-Smtp-Source: AH8x226oSsTKJLibGZHP5uNEZ5IV4OzKEkHubQsWnJGuxfl9e41YFlwlvOeyYFws1d+6OyFv05vD X-Received: by 2002:a17:902:8491:: with SMTP id c17-v6mr2425189plo.105.1518698013132; Thu, 15 Feb 2018 04:33:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518698013; cv=none; d=google.com; s=arc-20160816; b=YvPhZPYAfCqm/lbse56nMtWOAfo/WDqBGpDwPB3IRBdyl57osv3W26Tkam74n7i+KP E8X6eGT4/YtoO1lwNu11Fkpf8UGTPXHQGETGfP1/80RYbw9ik1f0tpKa60hSbNEklGL2 rf1vSHvPrBLPQ2lbO616gWn05s7QxxO1GKw9WzbBaVOaR7dXmx19ldB/oG+WpKwYOpgT mbXSXwv91n/zWxQMxD3DYb+7zPKTQMfnJj1e06Uf/oZdcJeE7tBjvZOoN8N1Zrq1YUPP TcXNkj/6s9P9lWam5aeph+5zpxMbiqzgXD3zS7krWMkJCPJzoRPl9OUmyMImsbMloV9h BdvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:reply-to:dkim-signature :arc-authentication-results; bh=nrMFic/VQkvwzdh8jXPnz39JwoyFGKicSJ69g5WMtpY=; b=oAi73124lBs2qltWwGcJi/gR8WX5GBdaryR+42Uf+F2MqS0mWVc8s9Vt9Im4CUfJOS 8OX0iV66+s/Wzv9VONCtwExwv/eccVH45m0KDPOZfmtFZJt+wH7fZMfODqzWpaOQllzg OBsTC44PHBiEIqq9w1E3mI2lnxl2iXVCbRml+rOlynpNe2eHT6QphsU4vgOnRNc8cHE3 eFIJNjqOCdXATtg1wZxGPJQ0ZOC31qRkZtZV32mdSY/HIcU/YiCn5O/AxvfbLJUdg1pT /8B543deCN04+YKTghQeO2gUt/c8k7kSjir6Bg49WDV0jcVepNZlPr7jPU/PihrEIM2S G3yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=T8j9PS8A; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f32-v6si6688792plf.754.2018.02.15.04.33.17; Thu, 15 Feb 2018 04:33:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=T8j9PS8A; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967992AbeBOMck (ORCPT + 99 others); Thu, 15 Feb 2018 07:32:40 -0500 Received: from mail-wr0-f195.google.com ([209.85.128.195]:41586 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967204AbeBOMcj (ORCPT ); Thu, 15 Feb 2018 07:32:39 -0500 Received: by mail-wr0-f195.google.com with SMTP id f8so749936wrh.8 for ; Thu, 15 Feb 2018 04:32:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=reply-to:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=nrMFic/VQkvwzdh8jXPnz39JwoyFGKicSJ69g5WMtpY=; b=T8j9PS8AGxIJKjSnyXBGIygwwIpiTLPn3p+MZGey5RPzA601KBD9aOXgcbE3CZ7gPy 4bNVFSB7tw9JLsmk83gUyRHh+ed0cCAAUMzqpxVnUL4rCNEriFOzc0Ag6AY0VM2dwhXF ztX4GzQ5sA00si34JjWmPyLKtLznauJQPGEEYUPIzeOPsSDkuQy6wZDBLBcD83kZ3tGA AjAhIW3k7iH5Kud3nX3ZUrzlGJOXj1LRw1AjqvmYT/kXG68UP+94zurxnEzRsKFVUmeg 0pPVbKh4jX5631lFA/EfoJz70LduBMtvSXiBMB+i78ohhF6FMKAReBTPB8ikxUmekSBf EgnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:to:cc:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding:content-language; bh=nrMFic/VQkvwzdh8jXPnz39JwoyFGKicSJ69g5WMtpY=; b=iFgJmHYh2M33+DuNim9gWS6+kK5BdWJiUzDiSqECFhDBhLOIbWVA/wP5GQfAi+xxKr v5DleNKUIeZAqH8qX1nP9iLsfSBkSmDMWkuh8x7VoG2UkQtpiDIEzxM8POZdW+AEJjtP s/vGEvBSdZti1EGy9wxpyvDBj0a9Y5WSt0/Yh4lZOqvQTvssiHV8OrT8hxdoHavjBotz BSPj1QFVaydM2k2jR1OlE242ZdbHFXe3yF4w1Nk1XvTf15O+Qo27LcKOsmGZq2aqevmZ ZC8qT3njBSEIvaksRkz5jYrp1k8swgKafELf7zj5JVATX81g03rK6fhCWrqpL2XH8vIo q2BQ== X-Gm-Message-State: APf1xPCtMZKW0JdIwhRjaUbpE6L3CyQuIT1HdjxtDFAMUGGGqv4tpvo3 cp1xe3JvJE5Z7FrSyxZIiEP/Nbpl X-Received: by 10.223.134.104 with SMTP id 37mr2214864wrw.150.1518697958025; Thu, 15 Feb 2018 04:32:38 -0800 (PST) Received: from ?IPv6:2a02:908:1251:8fc0:4c6d:7233:b7e1:3b88? ([2a02:908:1251:8fc0:4c6d:7233:b7e1:3b88]) by smtp.gmail.com with ESMTPSA id k63sm7928450wrc.80.2018.02.15.04.32.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Feb 2018 04:32:37 -0800 (PST) Reply-To: christian.koenig@amd.com Subject: Re: [PATCH] drm/amdgpu_gem: fix error handling path in amdgpu_gem_va_update_vm To: "Gustavo A. R. Silva" , Alex Deucher , =?UTF-8?Q?Christian_K=c3=b6nig?= , "David (ChunMing) Zhou" , David Airlie Cc: "Gustavo A. R. Silva" , dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20180215052000.GA25691@embeddedgus> From: =?UTF-8?Q?Christian_K=c3=b6nig?= Message-ID: Date: Thu, 15 Feb 2018 13:32:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180215052000.GA25691@embeddedgus> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Reviewed-by: Christian König > --- > 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)