mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-04 04:02:26 +00:00
netfilter: nft_osf: simplify init path
Remove useless branch to check for errors in nft_parse_register_store(). Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Florian Westphal <fw@strlen.de>
This commit is contained in:
parent
c47ec2b120
commit
29a2800255
@ -63,7 +63,6 @@ static int nft_osf_init(const struct nft_ctx *ctx,
|
||||
{
|
||||
struct nft_osf *priv = nft_expr_priv(expr);
|
||||
u32 flags;
|
||||
int err;
|
||||
u8 ttl;
|
||||
|
||||
if (!tb[NFTA_OSF_DREG])
|
||||
@ -83,13 +82,9 @@ static int nft_osf_init(const struct nft_ctx *ctx,
|
||||
priv->flags = flags;
|
||||
}
|
||||
|
||||
err = nft_parse_register_store(ctx, tb[NFTA_OSF_DREG], &priv->dreg,
|
||||
NULL, NFT_DATA_VALUE,
|
||||
NFT_OSF_MAXGENRELEN);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
return 0;
|
||||
return nft_parse_register_store(ctx, tb[NFTA_OSF_DREG], &priv->dreg,
|
||||
NULL, NFT_DATA_VALUE,
|
||||
NFT_OSF_MAXGENRELEN);
|
||||
}
|
||||
|
||||
static int nft_osf_dump(struct sk_buff *skb,
|
||||
|
Loading…
Reference in New Issue
Block a user