Commit 5ec29365 authored by Quentin Lambert's avatar Quentin Lambert Committed by 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: default avatarQuentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment