[PATCH] drm/vmwgfx: fix asssignment of vmw_bo_p to NULL
Colin King
colin.king at canonical.com
Sat Aug 16 12:19:08 PDT 2014
From: Colin Ian King <colin.king at 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 at 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
More information about the dri-devel
mailing list