Commit 9d287e70 authored by Everest K.C's avatar Everest K.C Committed by Steffen Klassert
Browse files

xfrm: Add error handling when nla_put_u32() returns an error



Error handling is missing when call to nla_put_u32() fails.
Handle the error when the call to nla_put_u32() returns an error.

The error was reported by Coverity Scan.
Report:
CID 1601525: (#1 of 1): Unused value (UNUSED_VALUE)
returned_value: Assigning value from nla_put_u32(skb, XFRMA_SA_PCPU, x->pcpu_num)
to err here, but that stored value is overwritten before it can be used

Fixes: 1ddf9916 ("xfrm: Add support for per cpu xfrm state handling.")
Signed-off-by: default avatarEverest K.C. <everestkc@everestkc.com.np>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Reviewed-by: default avatarPrzemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
parent af2c4fa5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment