shmem: remove unneeded variable ret
authorMiaohe Lin <linmiaohe@huawei.com>
Thu, 2 Sep 2021 21:54:06 +0000 (14:54 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 3 Sep 2021 16:58:11 +0000 (09:58 -0700)
commitf2b346e4522c2849a3dc59b7077b8952918ef486
treed240d8b7fa83c8432ea94f8fd9ff4a4e1c39d997
parentbf11b9a8e9a93c1fc0ebfc2929622d5cf7d43888
shmem: remove unneeded variable ret

Patch series "Cleanups for shmem".

This series contains cleanups to remove unneeded variable, header file,
function forward declaration and so on.  More details can be found in the
respective changelogs.

This patch (of 4):

The local variable ret is always equal to -ENOMEM and never touched.  So
remove it and return -ENOMEM directly to simplify the code.

Link: https://lkml.kernel.org/r/20210812120350.49801-1-linmiaohe@huawei.com
Link: https://lkml.kernel.org/r/20210812120350.49801-2-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/shmem.c