]> git.baikalelectronics.ru Git - kernel.git/commit
mm: initialize return of vm_insert_pages
authorTom Rix <trix@redhat.com>
Fri, 24 Jul 2020 04:15:18 +0000 (21:15 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 24 Jul 2020 19:42:41 +0000 (12:42 -0700)
commit5f2d6521234c0b1857b333b795cfdb84f36cb6c7
treeabef90c1a93704fe1dada6dc17f47adee09abc69
parentf720d63b4b5fbecbc2e36d9f7319de5ef682e027
mm: initialize return of vm_insert_pages

clang static analysis reports a garbage return

  In file included from mm/memory.c:84:
  mm/memory.c:1612:2: warning: Undefined or garbage value returned to caller [core.uninitialized.UndefReturn]
          return err;
          ^~~~~~~~~~

The setting of err depends on a loop executing.  So initialize err.

Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/r/20200703155354.29132-1-trix@redhat.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory.c