]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vmwgfx: Zero initialize handle in vmw_execbuf_process
authorNathan Chancellor <natechancellor@gmail.com>
Tue, 12 Mar 2019 03:24:46 +0000 (20:24 -0700)
committerDeepak Rawat <drawat@vmware.com>
Mon, 8 Apr 2019 17:29:05 +0000 (10:29 -0700)
commitb7b17c83e135bd08606bcfe6732b803e1c2fa0d7
treeb728d7813277af77d18b04f7ab69b22820486010
parentf2abe8872900fd08ed74783e4860a5c82f26962c
drm/vmwgfx: Zero initialize handle in vmw_execbuf_process

When building with -Wsometimes-uninitialized, Clang warns:

drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:3964:7: warning: variable
'handle' is used uninitialized whenever '?:' condition is false
[-Wsometimes-uninitialized]

It's not wrong; however, in practice, this is never an issue because
the value of handle isn't used when user_fence_rep is NULL because
vmw_execbuf_copy_fence_user returns immediately when that is the case.
Just zero initialize this variable so that Clang no longer warns.

Link: https://github.com/ClangBuiltLinux/linux/issues/397
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Deepak Rawat <drawat@vmware.com>
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c