From: David S. Miller Date: Wed, 17 May 2017 20:03:16 +0000 (-0400) Subject: sch_dsmark: Fix uninitialized variable warning. X-Git-Tag: v4.13-rc1~157^2~433 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=9d4f97f97bb8adc47f569d995402c33de9a4fa19;p=linux.git 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 --- 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;