options: move option temporary check after the err check

option is set only if err returned from update_option() is 0, so
check err first before checking option->temporary. Otherwise, it
may results in a dereference of an undefined pointer value.

Fixes: 8180763d6f82 ("libteam: always add newly created option to option list")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
1 file changed