]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/vmwgfx: Fix gcc-7.1.1 warning
authorSinclair Yeh <syeh@vmware.com>
Tue, 18 Jul 2017 06:28:36 +0000 (23:28 -0700)
committerSinclair Yeh <syeh@vmware.com>
Tue, 18 Jul 2017 06:41:21 +0000 (23:41 -0700)
The current code does not look correct, and the reason for it is
probably lost.  Since this now generates a compiler warning,
fix it to what makes sense.

Cc: <stable@vger.kernel.org>
Reported-by: Arnd Bergmann <arnd@arndb.de>
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c

index c8faf1ac53331fae800cc69ddf7b236bbc3cdebd..2cfb3c93f42ab430be0b36ae78c40897ef75cc4c 100644 (file)
@@ -519,7 +519,7 @@ static int vmw_cmd_invalid(struct vmw_private *dev_priv,
                           struct vmw_sw_context *sw_context,
                           SVGA3dCmdHeader *header)
 {
-       return capable(CAP_SYS_ADMIN) ? : -EINVAL;
+       return -EINVAL;
 }
 
 static int vmw_cmd_ok(struct vmw_private *dev_priv,