lkml.org 
[lkml]   [2014]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] drm/vmwgfx: fix asssignment of vmw_bo_p to NULL
Date
From: Colin Ian King <colin.king@canonical.com>

cppcheck detected an incorrect assignment:

[drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:903]: (warning) Assignment
of function parameter has no effect outside the function. Did you
forget dereferencing it?

the original assigment didn't do anything, instead *vmw_bo_p should
be set to NULL.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
index 7bfdaa1..b1632c4 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
@@ -917,7 +917,7 @@ static int vmw_translate_mob_ptr(struct vmw_private *dev_priv,

out_no_reloc:
vmw_dmabuf_unreference(&vmw_bo);
- vmw_bo_p = NULL;
+ *vmw_bo_p = NULL;
return ret;
}

--
2.1.0.rc1


\
 
 \ /
  Last update: 2014-08-16 21:41    [W:0.016 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site