net/sched: remove unneeded NULL check
authorDan Carpenter <error27@gmail.com>
Sat, 14 Aug 2010 11:09:49 +0000 (11:09 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Aug 2010 21:24:51 +0000 (14:24 -0700)
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>
net/sched/sch_api.c

index 408eea7086aace341d1ed9812d956db35cfdfb86..6fb3d41c0e41174d35d4d96612c493effcb1da4c 100644 (file)
@@ -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);