diff options
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/drivers/line.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c index 1664cce7b0ac..050e4ddbbb65 100644 --- a/arch/um/drivers/line.c +++ b/arch/um/drivers/line.c | |||
@@ -821,12 +821,12 @@ void register_winch_irq(int fd, int tty_fd, int pid, struct tty_struct *tty, | |||
821 | 821 | ||
822 | static void unregister_winch(struct tty_struct *tty) | 822 | static void unregister_winch(struct tty_struct *tty) |
823 | { | 823 | { |
824 | struct list_head *ele; | 824 | struct list_head *ele, *next; |
825 | struct winch *winch; | 825 | struct winch *winch; |
826 | 826 | ||
827 | spin_lock(&winch_handler_lock); | 827 | spin_lock(&winch_handler_lock); |
828 | 828 | ||
829 | list_for_each(ele, &winch_handlers) { | 829 | list_for_each_safe(ele, next, &winch_handlers) { |
830 | winch = list_entry(ele, struct winch, list); | 830 | winch = list_entry(ele, struct winch, list); |
831 | if (winch->tty == tty) { | 831 | if (winch->tty == tty) { |
832 | free_winch(winch, 1); | 832 | free_winch(winch, 1); |