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>
This commit is contained in:
Pavel Machek 2020-03-09 23:33:23 +01:00 committed by David S. Miller
parent c7211ff3be
commit dacf470b26
2 changed files with 4 additions and 10 deletions

View File

@ -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();
}

View File

@ -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();
}