diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-04-29 10:42:50 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2016-05-03 19:13:52 +1000 |
commit | ed25c4ecda2d9235daf841f15a5bcd32fff4a1ee (patch) | |
tree | b08c72ae7e30cd9abe78a4788e30ad27aec1c0fe | |
parent | 46518e0f67faf0c6197b059842629b06737f0adb (diff) | |
download | linux-next-ed25c4ecda2d9235daf841f15a5bcd32fff4a1ee.tar.gz |
drm/amdgpu: use ERR_PTR() to return from amdgpu_mn_get
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.
Fixes: ad35eee9fb17 ("drm/amdgpu: make amdgpu_mn_get wait for mmap_sem killable")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) |