char: misc: remove usage of list iterator past the loop body
authorJakob Koschel <jakobkoschel@gmail.com>
Sat, 19 Mar 2022 20:14:54 +0000 (21:14 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 24 Apr 2022 15:15:12 +0000 (17:15 +0200)
commit3a5e65023f0274d2104724a294b9b0eb4db59057
tree44fcfff1a4f81f5f3028d00218ba4da0a66d7ee5
parenta8a570c6d0fd9e96d52697133f33962bf08b445b
char: misc: remove usage of list iterator past the loop body

In preparation to limit the scope of the list iterator to the list
traversal loop, use a dedicated pointer pointing to the found element [1].

Link: https://lore.kernel.org/all/YhdfEIwI4EdtHdym@kroah.com/
Signed-off-by: Jakob Koschel <jakobkoschel@gmail.com>
Link: https://lore.kernel.org/r/20220319201454.2511733-1-jakobkoschel@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/misc.c