]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - kernel/sysctl.c
liquidio: silence a locking static checker warning
[karo-tx-linux.git] / kernel / sysctl.c
index acf0a5a06da7c0c47003982e83bb74fcd4ebba5f..8c8714fcb53c35a390becf14f2fa8e1bfc20142c 100644 (file)
@@ -2133,9 +2133,12 @@ static int do_proc_douintvec_conv(bool *negp, unsigned long *lvalp,
        if (write) {
                if (*negp)
                        return -EINVAL;
+               if (*lvalp > UINT_MAX)
+                       return -EINVAL;
                *valp = *lvalp;
        } else {
                unsigned int val = *valp;
+               *negp = false;
                *lvalp = (unsigned long)val;
        }
        return 0;