diff options
author | David S. Miller <davem@davemloft.net> | 2018-01-25 05:44:15 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-25 05:44:15 +0100 |
commit | 955bd1d216c6ce4f40b181cfd369f4116e0627f2 (patch) | |
tree | d3f2669d3abb1c53c2f364732e8122ce0f25e3da /net/xfrm/xfrm_state.c | |
parent | Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsh... (diff) | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (diff) | |
download | linux-955bd1d216c6ce4f40b181cfd369f4116e0627f2.tar.xz linux-955bd1d216c6ce4f40b181cfd369f4116e0627f2.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm/xfrm_state.c')
-rw-r--r-- | net/xfrm/xfrm_state.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index 20b1e414dbee..54e21f19d722 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -317,7 +317,7 @@ retry: if (!type && try_load) { request_module("xfrm-offload-%d-%d", family, proto); - try_load = 0; + try_load = false; goto retry; } @@ -2279,8 +2279,6 @@ int __xfrm_init_state(struct xfrm_state *x, bool init_replay, bool offload) goto error; } - x->km.state = XFRM_STATE_VALID; - error: return err; } @@ -2289,7 +2287,13 @@ EXPORT_SYMBOL(__xfrm_init_state); int xfrm_init_state(struct xfrm_state *x) { - return __xfrm_init_state(x, true, false); + int err; + + err = __xfrm_init_state(x, true, false); + if (!err) + x->km.state = XFRM_STATE_VALID; + + return err; } EXPORT_SYMBOL(xfrm_init_state); |