Message ID | m1tunny77w.fsf@fess.ebiederm.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ucounts: Silence warning in dec_rlimit_ucounts | expand |
diff --git a/kernel/ucount.c b/kernel/ucount.c index d316bac3e520..12a48457bb86 100644 --- a/kernel/ucount.c +++ b/kernel/ucount.c @@ -263,7 +263,7 @@ long inc_rlimit_ucounts(struct ucounts *ucounts, enum ucount_type type, long v) bool dec_rlimit_ucounts(struct ucounts *ucounts, enum ucount_type type, long v) { struct ucounts *iter; - long new; + long new = -1; /* Silence compiler warnings */ for (iter = ucounts; iter; iter = iter->ns->ucounts) { long dec = atomic_long_add_return(-v, &iter->ucount[type]); WARN_ON_ONCE(dec < 0);