netfilter: nft_inner: fix IS_ERR() vs NULL check
The __nft_expr_type_get() function returns NULL on error. It never
returns error pointers.
Fixes: 3a07327d10
("netfilter: nft_inner: support for inner tunnel header matching")
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
committed by
Pablo Neira Ayuso
parent
339e79dfb0
commit
98cbc40e4f
@ -2873,8 +2873,8 @@ int nft_expr_inner_parse(const struct nft_ctx *ctx, const struct nlattr *nla,
|
||||
return -EINVAL;
|
||||
|
||||
type = __nft_expr_type_get(ctx->family, tb[NFTA_EXPR_NAME]);
|
||||
if (IS_ERR(type))
|
||||
return PTR_ERR(type);
|
||||
if (!type)
|
||||
return -ENOENT;
|
||||
|
||||
if (!type->inner_ops)
|
||||
return -EOPNOTSUPP;
|
||||
|
Reference in New Issue
Block a user