diff options
-rw-r--r-- | drivers/net/can/slcan.c | 7 | ||||
-rw-r--r-- | drivers/net/slip/slip.c | 7 |
2 files changed, 4 insertions, 10 deletions
diff --git a/drivers/net/can/slcan.c b/drivers/net/can/slcan.c index 2f5c287eac95..686d853fc249 100644 --- a/drivers/net/can/slcan.c +++ b/drivers/net/can/slcan.c @@ -348,11 +348,8 @@ static void slcan_write_wakeup(struct tty_struct *tty) rcu_read_lock(); sl = rcu_dereference(tty->disc_data); - if (!sl) - goto out; - - schedule_work(&sl->tx_work); -out: + if (sl) + schedule_work(&sl->tx_work); rcu_read_unlock(); } diff --git a/drivers/net/slip/slip.c b/drivers/net/slip/slip.c index babb01888b78..f81fb0b13a94 100644 --- a/drivers/net/slip/slip.c +++ b/drivers/net/slip/slip.c @@ -456,11 +456,8 @@ static void slip_write_wakeup(struct tty_struct *tty) rcu_read_lock(); sl = rcu_dereference(tty->disc_data); - if (!sl) - goto out; - - schedule_work(&sl->tx_work); -out: + if (sl) + schedule_work(&sl->tx_work); rcu_read_unlock(); } |