summaryrefslogtreecommitdiff
path: root/drivers/net/slip
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>2020-03-10 01:33:23 +0300
committerDavid S. Miller <davem@davemloft.net>2020-03-12 09:15:26 +0300
commitdacf470b26418e91bef195342b25a234c94052e3 (patch)
tree21bab91497fa718133eb064b9e763a254a8a36b2 /drivers/net/slip
parentc7211ff3be0fa98a55920f876608cc9e13c9eb5f (diff)
downloadlinux-dacf470b26418e91bef195342b25a234c94052e3.tar.xz
net: slcan, slip -- no need for goto when if () will do
No need to play with gotos to jump over single statement. Signed-off-by: Pavel Machek <pavel@ucw.cz> Acked-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/slip')
-rw-r--r--drivers/net/slip/slip.c7
1 files changed, 2 insertions, 5 deletions
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();
}