summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorRyan Mallon2012-01-27 22:51:40 +0100
committerDave Airlie2012-01-30 10:32:39 +0100
commitbf9c05d5b6d19b3e4c9fe21047694e94f48db89b (patch)
tree0c5728cdd5ad4bcc8fb770a78d1521f1113f2d8a /drivers/gpu
parentdrm/radeon/kms: Fix device tree linkage of i2c buses (diff)
downloadkernel-qcow2-linux-bf9c05d5b6d19b3e4c9fe21047694e94f48db89b.tar.gz
kernel-qcow2-linux-bf9c05d5b6d19b3e4c9fe21047694e94f48db89b.tar.xz
kernel-qcow2-linux-bf9c05d5b6d19b3e4c9fe21047694e94f48db89b.zip
vmwgfx: Fix assignment in vmw_framebuffer_create_handle
The assignment of handle in vmw_framebuffer_create_handle doesn't actually do anything useful and is incorrectly assigning an integer value to a pointer argument. It appears that this is a typo and should be dereferencing handle rather than assigning to it directly. This fixes a bug where an undefined handle value is potentially returned to user-space. Signed-off-by: Ryan Mallon <rmallon@gmail.com> Reviewed-by: Jakob Bornecrantz<jakob@vmware.com> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_kms.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
index 0af6ebdf205d..b66ef0e3cde1 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
@@ -378,7 +378,7 @@ int vmw_framebuffer_create_handle(struct drm_framebuffer *fb,
unsigned int *handle)
{
if (handle)
- handle = 0;
+ *handle = 0;
return 0;
}