Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mm/vmpressure.c: fix a signedness bug in vmpressure_register_event()
The "mode" and "level" variables are enums and in this context GCC will treat them as unsigned ints so the error handling is never triggered. I also removed the bogus initializer because it isn't required any more and it's sort of confusing. [[email protected]: reduce implicit and explicit typecasting] [[email protected]: fix return value, add comment, per Matthew] Link: http://lkml.kernel.org/r/20190925110449.GO3264@mwanda Fixes: 3cadfa2 ("mm/vmpressure.c: convert to use match_string() helper") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: David Rientjes <[email protected]> Reviewed-by: Matthew Wilcox <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Enrico Weigelt <[email protected]> Cc: Kate Stewart <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information