]> git.baikalelectronics.ru Git - kernel.git/commit
gtp: simplify error handling code in 'gtp_encap_enable()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 5 Jan 2020 17:36:07 +0000 (18:36 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Jan 2020 21:39:35 +0000 (13:39 -0800)
commitac7fa91b4e8b10f4382601822956d57a3b54abb4
treed498ed45793c1c24b2afade999da4fe10121fd82
parentbaa1aa4fe91bbacb4c8c9ec3ebc7e62a86945f8e
gtp: simplify error handling code in 'gtp_encap_enable()'

'gtp_encap_disable_sock(sk)' handles the case where sk is NULL, so there
is no need to test it before calling the function.

This saves a few line of code.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/gtp.c