Explorar o código

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 <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dan Carpenter %!s(int64=14) %!d(string=hai) anos
pai
achega
00093fab98
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      net/sched/sch_api.c

+ 1 - 1
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);
 		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);
 		return ERR_PTR(-EINVAL);
 
 
 	spin_lock(&qdisc_stab_lock);
 	spin_lock(&qdisc_stab_lock);