]> git.baikalelectronics.ru Git - kernel.git/commit
fs/kernfs/dir.c: Clean code by removing always true condition
authorMateusz Nosek <mateusznosek0@gmail.com>
Mon, 30 Dec 2019 19:16:28 +0000 (20:16 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jan 2020 15:14:47 +0000 (16:14 +0100)
commita062c5b1c8facfdfaf18f38470819c980d9c4e46
tree56dfc88e627db107df6eb91f1930a9b8f8faa955
parent762a9902f56e38029925a7ce65248aaf93f55c07
fs/kernfs/dir.c: Clean code by removing always true condition

Previously there was an additional check if variable pos is not null.
However, this check happens after entering while loop and only then,
which can happen only if pos is not null.
Therefore the additional check is redundant and can be removed.

Signed-off-by: Mateusz Nosek <mateusznosek0@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Link: https://lore.kernel.org/r/20191230191628.21099-1-mateusznosek0@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/kernfs/dir.c