On Tue, 24 Nov 2020 18:50:45 +0100 Karsten Graul wrote:
> +static int smc_nl_fill_smcd_lgr(struct smc_link_group *lgr,
> + struct sk_buff *skb,
> + struct netlink_callback *cb)
> +{
> + char smc_host[SMC_MAX_HOSTNAME_LEN + 1];
> + char smc_pnet[SMC_MAX_PNETID_LEN + 1];
> + char smc_eid[SMC_MAX_EID_LEN + 1];
> + struct nlattr *v2_attrs;
> + struct nlattr *attrs;
> + void *nlh;
> +
> + nlh = genlmsg_put(skb, NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq,
> + &smc_gen_nl_family, NLM_F_MULTI,
> + SMC_NETLINK_GET_LGR_SMCD);
> + if (!nlh)
> + return -EMSGSIZE;
In the previous patched you had a goto here. I prefer direct return,
but either way - please be consistent.