Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1634989 > unrolled thread
| Started by | Colin King <colin.king@canonical.com> |
|---|---|
| First post | 2017-05-03 16:00 +0200 |
| Last post | 2017-05-04 17:10 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] net/sched: remove redundant null check on head Colin King <colin.king@canonical.com> - 2017-05-03 16:00 +0200
Re: [PATCH] net/sched: remove redundant null check on head Jiri Pirko <jiri@resnulli.us> - 2017-05-03 16:20 +0200
Re: [PATCH] net/sched: remove redundant null check on head David Miller <davem@davemloft.net> - 2017-05-04 17:10 +0200
| From | Colin King <colin.king@canonical.com> |
|---|---|
| Date | 2017-05-03 16:00 +0200 |
| Subject | [PATCH] net/sched: remove redundant null check on head |
| Message-ID | <tD2YX-6a8-21@gated-at.bofh.it> |
From: Colin Ian King <colin.king@canonical.com>
head is previously null checked and so the 2nd null check on head
is redundant and therefore can be removed.
Detected by CoverityScan, CID#1399505 ("Logically dead code")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
net/sched/cls_matchall.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/sched/cls_matchall.c b/net/sched/cls_matchall.c
index 2efb36c08f2a..dee469fed967 100644
--- a/net/sched/cls_matchall.c
+++ b/net/sched/cls_matchall.c
@@ -203,8 +203,7 @@ static int mall_change(struct net *net, struct sk_buff *in_skb,
*arg = (unsigned long) head;
rcu_assign_pointer(tp->root, new);
- if (head)
- call_rcu(&head->rcu, mall_destroy_rcu);
+ call_rcu(&head->rcu, mall_destroy_rcu);
return 0;
err_replace_hw_filter:
--
2.11.0
[toc] | [next] | [standalone]
| From | Jiri Pirko <jiri@resnulli.us> |
|---|---|
| Date | 2017-05-03 16:20 +0200 |
| Message-ID | <tD3ii-6wt-25@gated-at.bofh.it> |
| In reply to | #1634989 |
Wed, May 03, 2017 at 03:50:40PM CEST, colin.king@canonical.com wrote:
>From: Colin Ian King <colin.king@canonical.com>
>
>head is previously null checked and so the 2nd null check on head
>is redundant and therefore can be removed.
>
>Detected by CoverityScan, CID#1399505 ("Logically dead code")
>
>Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2017-05-04 17:10 +0200 |
| Message-ID | <tDqye-595-29@gated-at.bofh.it> |
| In reply to | #1634989 |
From: Colin King <colin.king@canonical.com>
Date: Wed, 3 May 2017 14:50:40 +0100
> From: Colin Ian King <colin.king@canonical.com>
>
> head is previously null checked and so the 2nd null check on head
> is redundant and therefore can be removed.
>
> Detected by CoverityScan, CID#1399505 ("Logically dead code")
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Applied.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web