summaryrefslogtreecommitdiff
path: root/net/sched/sch_dsmark.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-05-17 23:03:16 +0300
committerDavid S. Miller <davem@davemloft.net>2017-05-17 23:04:38 +0300
commit9d4f97f97bb8adc47f569d995402c33de9a4fa19 (patch)
treef2cc4e4f34251d0a7435aef2b6766b7d7d19de44 /net/sched/sch_dsmark.c
parent656aae43057ee3e85c9b4170706bc864108ee1cc (diff)
downloadlinux-9d4f97f97bb8adc47f569d995402c33de9a4fa19.tar.xz
sch_dsmark: Fix uninitialized variable warning.
We still need to initialize err to -EINVAL for the case where 'opt' is NULL in dsmark_init(). Fixes: 6529eaba33f0 ("net: sched: introduce tcf block infractructure") Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_dsmark.c')
-rw-r--r--net/sched/sch_dsmark.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c
index ba45102cff94..7ccdd825d34e 100644
--- a/net/sched/sch_dsmark.c
+++ b/net/sched/sch_dsmark.c
@@ -333,7 +333,7 @@ static int dsmark_init(struct Qdisc *sch, struct nlattr *opt)
{
struct dsmark_qdisc_data *p = qdisc_priv(sch);
struct nlattr *tb[TCA_DSMARK_MAX + 1];
- int err;
+ int err = -EINVAL;
u32 default_index = NO_DEFAULT_INDEX;
u16 indices;
int i;