err = -ENOENT; x->type = xfrm_get_type(x->id.proto, x->props.family);
err = -EAFNOSUPPORT; afinfo = xfrm_state_get_afinfo(family); if (!afinfo) goto error;  err = 0; if (afinfo->init_flags) err = afinfo->init_flags(x);  xfrm_state_put_afinfo(afinfo);  if (err) goto error;  err = -EPROTONOSUPPORT; x->type = xfrm_get_type(x->id.proto, family);
int xfrm_init_state(struct xfrm_state *x){	int err;	err = -ENOENT;	x->type = xfrm_get_type(x->id.proto, x->props.family);	if (x->type == NULL)		goto error;	err = x->type->init_state(x);	if (err)		goto error;	x->km.state = XFRM_STATE_VALID;error:	return err;}