X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=net%2Fsched%2Fsch_mqprio.c;h=28de43092330abc125423d5328babc709b1f986f;hb=87f71ae2dd7471c1b4c94100be1f218e91dc64c3;hp=f88256cbacbfe4b89c202d591514fb28feaac11b;hpb=85a0f7b220777cd3c232fd2f079db5c4a874c4ee;p=~andy%2Flinux diff --git a/net/sched/sch_mqprio.c b/net/sched/sch_mqprio.c index f88256cbacb..28de4309233 100644 --- a/net/sched/sch_mqprio.c +++ b/net/sched/sch_mqprio.c @@ -107,7 +107,7 @@ static int mqprio_init(struct Qdisc *sch, struct nlattr *opt) if (!netif_is_multiqueue(dev)) return -EOPNOTSUPP; - if (nla_len(opt) < sizeof(*qopt)) + if (!opt || nla_len(opt) < sizeof(*qopt)) return -EINVAL; qopt = nla_data(opt);