]> git.baikalelectronics.ru Git - kernel.git/commit
ksm: unstable_tree_search_insert error checking cleanup
authorAndrea Arcangeli <aarcange@redhat.com>
Fri, 6 Nov 2015 02:49:19 +0000 (18:49 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 6 Nov 2015 03:34:48 +0000 (19:34 -0800)
commit271c6057b4cdcfd2df18d0c2fec107b1e19e1f74
treed16cae310973cef4ada33fceabe780c102e14196
parent362cb3ac15b6d7e0013c703ea0f9b3093afbefd4
ksm: unstable_tree_search_insert error checking cleanup

get_mergeable_page() can only return NULL (also in case of errors) or the
pinned mergeable page.  It can't return an error different than NULL.
This optimizes away the unnecessary error check.

Add a return after the "out:" label in the callee to make it more
readable.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Acked-by: Hugh Dickins <hughd@google.com>
Cc: Petr Holasek <pholasek@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/ksm.c