From: Pavel Machek Date: Mon, 9 Mar 2020 22:33:23 +0000 (+0100) Subject: net: slcan, slip -- no need for goto when if () will do X-Git-Tag: v5.10.7~2946^2~196 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dacf470b26418e91bef195342b25a234c94052e3;p=platform%2Fkernel%2Flinux-rpi.git 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 Acked-by: Oliver Hartkopp Signed-off-by: David S. Miller --- diff --git a/drivers/net/can/slcan.c b/drivers/net/can/slcan.c index 2f5c287..686d853 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 babb018..f81fb0b 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(); }