diff mbox

drm/vmwgfx: fix asssignment of vmw_bo_p to NULL

Message ID 1408216748-4839-1-git-send-email-colin.king@canonical.com (mailing list archive)
State New, archived
Headers show

Commit Message

Colin King Aug. 16, 2014, 7:19 p.m. UTC
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 mbox

Patch

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;
 }