summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-08-14 22:02:43 (GMT)
committerInki Dae <inki.dae@samsung.com>2014-10-15 11:05:12 (GMT)
commitb292cfdc7cd475fb805dd80e5b3194ff49107730 (patch)
tree37d12871052566220031d65d3f0a402599d2bfa0
parentbaf526df86a1a9add07cda6e80ca6b301ab81aa7 (diff)
downloadlinux-3.10-b292cfdc7cd475fb805dd80e5b3194ff49107730.zip
linux-3.10-b292cfdc7cd475fb805dd80e5b3194ff49107730.tar.gz
linux-3.10-b292cfdc7cd475fb805dd80e5b3194ff49107730.tar.bz2
drm/prime: clarify logic a bit in drm_gem_prime_fd_to_handle
if (!ret) implies that ret == 0, so no need to clear it again. And explicitly check for ret == 0 to indicate that we're checking an errno integer. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/drm_prime.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c
index cf38430..acb5c5b 100644
--- a/drivers/gpu/drm/drm_prime.c
+++ b/drivers/gpu/drm/drm_prime.c
@@ -444,10 +444,8 @@ int drm_gem_prime_fd_to_handle(struct drm_device *dev,
ret = drm_prime_lookup_buf_handle(&file_priv->prime,
dma_buf, handle);
- if (!ret) {
- ret = 0;
+ if (ret == 0)
goto out_put;
- }
/* never seen this one, need to import */
obj = dev->driver->gem_prime_import(dev, dma_buf);