projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5cdc03
)
[NET_SCHED]: cls_u32: remove unnecessary NULL-ptr check
author
Patrick McHardy
<kaber@trash.net>
Thu, 23 Mar 2006 09:16:48 +0000
(
01:16
-0800)
committer
David S. Miller
<davem@davemloft.net>
Thu, 23 Mar 2006 09:16:48 +0000
(
01:16
-0800)
In both cases n can't be NULL without crashing anyway.
Coverity #78
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/cls_u32.c
patch
|
blob
|
blame
|
history
diff --git
a/net/sched/cls_u32.c
b/net/sched/cls_u32.c
index 2b670479dde1d68ea192e641dbe69ffb754bf9f4..78e052591fa99c299da13011277249548d1885a8 100644
(file)
--- a/
net/sched/cls_u32.c
+++ b/
net/sched/cls_u32.c
@@
-347,8
+347,7
@@
static int u32_destroy_key(struct tcf_proto *tp, struct tc_u_knode *n)
if (n->ht_down)
n->ht_down->refcnt--;
#ifdef CONFIG_CLS_U32_PERF
- if (n)
- kfree(n->pf);
+ kfree(n->pf);
#endif
kfree(n);
return 0;
@@
-680,8
+679,7
@@
static int u32_change(struct tcf_proto *tp, unsigned long base, u32 handle,
return 0;
}
#ifdef CONFIG_CLS_U32_PERF
- if (n)
- kfree(n->pf);
+ kfree(n->pf);
#endif
kfree(n);
return err;