mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
esp4: fix error return code in esp_output()
Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Signed-off-by: Wei Yongjun <[email protected]> Acked-by: Steffen Klassert <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
8f3359bdc8
commit
06848c10f7
1 changed files with 3 additions and 3 deletions
|
|
@ -139,8 +139,6 @@ static int esp_output(struct xfrm_state *x, struct sk_buff *skb)
|
|||
|
||||
/* skb is pure payload to encrypt */
|
||||
|
||||
err = -ENOMEM;
|
||||
|
||||
esp = x->data;
|
||||
aead = esp->aead;
|
||||
alen = crypto_aead_authsize(aead);
|
||||
|
|
@ -176,8 +174,10 @@ static int esp_output(struct xfrm_state *x, struct sk_buff *skb)
|
|||
}
|
||||
|
||||
tmp = esp_alloc_tmp(aead, nfrags + sglists, seqhilen);
|
||||
if (!tmp)
|
||||
if (!tmp) {
|
||||
err = -ENOMEM;
|
||||
goto error;
|
||||
}
|
||||
|
||||
seqhi = esp_tmp_seqhi(tmp);
|
||||
iv = esp_tmp_iv(aead, tmp, seqhilen);
|
||||
|
|
|
|||
Loading…
Reference in a new issue