From patchwork Thu Apr 28 09:33:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102412 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp105823qge; Thu, 28 Apr 2016 02:35:14 -0700 (PDT) X-Received: by 10.98.64.132 with SMTP id f4mr19116612pfd.146.1461836114870; Thu, 28 Apr 2016 02:35:14 -0700 (PDT) Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id 66si9405654pft.11.2016.04.28.02.35.14; Thu, 28 Apr 2016 02:35:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E4AD56E191; Thu, 28 Apr 2016 09:35:09 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id BAFE66EC9E for ; Thu, 28 Apr 2016 09:35:06 +0000 (UTC) Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue102) with ESMTPA (Nemesis) id 0LnjYN-1bcjHD46Ax-00hsNZ; Thu, 28 Apr 2016 11:34:57 +0200 From: Arnd Bergmann To: Alex Deucher , Michal Hocko Subject: [PATCH] drm/amdgpu: use ERR_PTR() to return from amdgpu_mn_get Date: Thu, 28 Apr 2016 11:33:48 +0200 Message-Id: <1461836093-1436847-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-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ou , Felix Kuehling , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, =?utf-8?q?Christian_K=C3=B6nig?= , Monk Liu X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The newly added failure path in amdgpu_mn_get() use the wrong return type: drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c: In function 'amdgpu_mn_get': drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:237:10: error: return makes pointer from integer without a cast This adds the necessary ERR_PTR() conversion. Signed-off-by: Arnd Bergmann Fixes: ad35eee9fb17 ("drm/amdgpu: make amdgpu_mn_get wait for mmap_sem killable") --- drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c index cf90686a50d1..32fa7b7913f7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c @@ -234,7 +234,7 @@ static struct amdgpu_mn *amdgpu_mn_get(struct amdgpu_device *adev) mutex_lock(&adev->mn_lock); if (down_write_killable(&mm->mmap_sem)) { mutex_unlock(&adev->mn_lock); - return -EINTR; + return ERR_PTR(-EINTR); } hash_for_each_possible(adev->mn_hash, rmn, node, (unsigned long)mm)