diff options
author | Quentin Lambert <lambert.quentin@gmail.com> | 2015-03-18 14:21:08 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-18 17:34:11 +0100 |
commit | 5ec293650827122df300581c17ca1d5de03bac3d (patch) | |
tree | c5026e4605c5a9650e94168c25f26ce1c133d60d /drivers/staging/dgnc | |
parent | 8ac7f9b37ebc6ae294a6ebbf8cd14d2bf3edc7b4 (diff) |
Staging: dgnc: release the lock before testing for nullity
The refactoring intrduced in
c84a083b995b ("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: c84a083b995b ("Staging: dgnc: Use goto for spinlock release before return")
Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/dgnc')
-rw-r--r-- | drivers/staging/dgnc/dgnc_tty.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c index 8445f84ddaa3..f1c4d07a0aaa 100644 --- a/drivers/staging/dgnc/dgnc_tty.c +++ b/drivers/staging/dgnc/dgnc_tty.c @@ -656,9 +656,9 @@ void dgnc_input(struct channel_t *ch) return; exit_unlock: + spin_unlock_irqrestore(&ch->ch_lock, flags); if (ld) tty_ldisc_deref(ld); - spin_unlock_irqrestore(&ch->ch_lock, flags); } |