From: Dan Carpenter Date: Sat, 14 Aug 2010 11:09:49 +0000 (+0000) Subject: net/sched: remove unneeded NULL check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=00093fab980d0a8950a64bdf9e346d0497b9a7e4;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git net/sched: remove unneeded NULL check There is no need to check "s". nla_data() doesn't return NULL. Also we already dereferenced "s" at this point so it would have oopsed ealier if it were NULL. Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller --- diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 408eea7086aa..6fb3d41c0e41 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -360,7 +360,7 @@ static struct qdisc_size_table *qdisc_get_stab(struct nlattr *opt) tsize = nla_len(tb[TCA_STAB_DATA]) / sizeof(u16); } - if (!s || tsize != s->tsize || (!tab && tsize > 0)) + if (tsize != s->tsize || (!tab && tsize > 0)) return ERR_PTR(-EINVAL); spin_lock(&qdisc_stab_lock);