[PATCH, RESEND 03/14] drm/vmwgfx: avoid gcc-7 parentheses warning
Linus Torvalds
torvalds at linux-foundation.org
Fri Jul 14 19:21:13 UTC 2017
On Fri, Jul 14, 2017 at 2:25 AM, Arnd Bergmann <arnd at arndb.de> wrote:
> - return capable(CAP_SYS_ADMIN) ? : -EINVAL;
> + return capable(CAP_SYS_ADMIN) ? 1 : -EINVAL;
NAK. This takes unintentionally insane code and turns it intentionally
insane. Any non-zero return is considered an error.
The right fix is almost certainly to just return -EINVAL unconditionally.
Linus
More information about the dri-devel
mailing list