summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/v3d
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2018-05-18 11:10:41 +0300
committerEric Anholt <eric@anholt.net>2018-05-21 10:44:33 -0700
commit17e23993f297467bae946a46e44f945d8dae93f8 (patch)
tree13c8fdd3b5ac06904de4b568eda87d732228d9bb /drivers/gpu/drm/v3d
parente8b58d6de1fe9119018ed9bbeecf373dcc397b8d (diff)
downloadblackbird-obmc-linux-17e23993f297467bae946a46e44f945d8dae93f8.tar.gz
blackbird-obmc-linux-17e23993f297467bae946a46e44f945d8dae93f8.zip
drm/v3d: Checking for NULL vs IS_ERR()
The v3d_fence_create() only returns error pointers on error. It never returns NULL. Fixes: 57692c94dcbe ("drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20180518081041.GC28335@mwanda
Diffstat (limited to 'drivers/gpu/drm/v3d')
-rw-r--r--drivers/gpu/drm/v3d/v3d_sched.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/v3d/v3d_sched.c b/drivers/gpu/drm/v3d/v3d_sched.c
index b07bece9417d..808bc901f567 100644
--- a/drivers/gpu/drm/v3d/v3d_sched.c
+++ b/drivers/gpu/drm/v3d/v3d_sched.c
@@ -114,8 +114,8 @@ static struct dma_fence *v3d_job_run(struct drm_sched_job *sched_job)
v3d_invalidate_caches(v3d);
fence = v3d_fence_create(v3d, q);
- if (!fence)
- return fence;
+ if (IS_ERR(fence))
+ return NULL;
if (job->done_fence)
dma_fence_put(job->done_fence);
OpenPOWER on IntegriCloud