* [PATCH net-next] net: core: devlink: simplify the return expression of devlink_nl_cmd_trap_set_doit()
@ 2020-12-08 12:10 Zheng Yongjun
2020-12-09 0:24 ` David Miller
2020-12-09 0:24 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Zheng Yongjun @ 2020-12-08 12:10 UTC (permalink / raw)
To: jiri, davem, kuba, netdev, linux-kernel; +Cc: Zheng Yongjun
Simplify the return expression.
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
net/core/devlink.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/net/core/devlink.c b/net/core/devlink.c
index 8c5ddffd707d..3f0a65ee0474 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -6981,7 +6981,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;
@@ -6992,11 +6991,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 *
--
2.22.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: core: devlink: simplify the return expression of devlink_nl_cmd_trap_set_doit()
2020-12-08 12:10 [PATCH net-next] net: core: devlink: simplify the return expression of devlink_nl_cmd_trap_set_doit() Zheng Yongjun
@ 2020-12-09 0:24 ` David Miller
2020-12-09 0:24 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2020-12-09 0:24 UTC (permalink / raw)
To: zhengyongjun3; +Cc: jiri, kuba, netdev, linux-kernel
From: Zheng Yongjun <zhengyongjun3@huawei.com>
Date: Tue, 8 Dec 2020 20:10:46 +0800
> Simplify the return expression.
>
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: core: devlink: simplify the return expression of devlink_nl_cmd_trap_set_doit()
2020-12-08 12:10 [PATCH net-next] net: core: devlink: simplify the return expression of devlink_nl_cmd_trap_set_doit() Zheng Yongjun
2020-12-09 0:24 ` David Miller
@ 2020-12-09 0:24 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2020-12-09 0:24 UTC (permalink / raw)
To: zhengyongjun3; +Cc: jiri, kuba, netdev, linux-kernel
From: Zheng Yongjun <zhengyongjun3@huawei.com>
Date: Tue, 8 Dec 2020 20:10:46 +0800
> Simplify the return expression.
>
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-12-09 0:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-08 12:10 [PATCH net-next] net: core: devlink: simplify the return expression of devlink_nl_cmd_trap_set_doit() Zheng Yongjun
2020-12-09 0:24 ` David Miller
2020-12-09 0:24 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).