提交 5ec29365 编写于 作者: Q Quentin Lambert 提交者: Greg Kroah-Hartman

Staging: dgnc: release the lock before testing for nullity

The refactoring intrduced in
c84a083b ("Staging: dgnc: Use goto for spinlock release before return")
inverts the order in which the lock is released and ld is tested for nullity.

This patch restores the execution flow.

Fixes: c84a083b ("Staging: dgnc: Use goto for spinlock release before return")
Signed-off-by: NQuentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 8ac7f9b3
...@@ -656,9 +656,9 @@ void dgnc_input(struct channel_t *ch) ...@@ -656,9 +656,9 @@ void dgnc_input(struct channel_t *ch)
return; return;
exit_unlock: exit_unlock:
spin_unlock_irqrestore(&ch->ch_lock, flags);
if (ld) if (ld)
tty_ldisc_deref(ld); tty_ldisc_deref(ld);
spin_unlock_irqrestore(&ch->ch_lock, flags);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册