mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 03:10:12 +00:00
net: core: devlink: simplify the return expression of devlink_nl_cmd_trap_set_doit()
Simplify the return expression. Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
9faad250ce
commit
8daa76a52d
1 changed files with 1 additions and 6 deletions
|
@ -6993,7 +6993,6 @@ static int devlink_nl_cmd_trap_set_doit(struct sk_buff *skb,
|
|||
struct netlink_ext_ack *extack = info->extack;
|
||||
struct devlink *devlink = info->user_ptr[0];
|
||||
struct devlink_trap_item *trap_item;
|
||||
int err;
|
||||
|
||||
if (list_empty(&devlink->trap_list))
|
||||
return -EOPNOTSUPP;
|
||||
|
@ -7004,11 +7003,7 @@ static int devlink_nl_cmd_trap_set_doit(struct sk_buff *skb,
|
|||
return -ENOENT;
|
||||
}
|
||||
|
||||
err = devlink_trap_action_set(devlink, trap_item, info);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
return 0;
|
||||
return devlink_trap_action_set(devlink, trap_item, info);
|
||||
}
|
||||
|
||||
static struct devlink_trap_group_item *
|
||||
|
|
Loading…
Reference in a new issue