lkml.org 
[lkml]   [2017]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH, RESEND 03/14] drm/vmwgfx: avoid gcc-7 parentheses warning
    On Fri, Jul 14, 2017 at 2:25 AM, Arnd Bergmann <arnd@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

    \
     
     \ /
      Last update: 2017-07-14 21:22    [W:3.642 / U:0.048 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site