pkt_sched: Fix warning false positives.
authorDavid S. Miller <davem@davemloft.net>
Thu, 27 Sep 2012 22:35:47 +0000 (18:35 -0400)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 11 Nov 2017 13:34:44 +0000 (13:34 +0000)
commita01e2a853c9aa6ca4e5c5f734e151b5cae9efd9b
tree17ec2fd7b8f8e4c2a7167f665922ed5677843dba
parenta650af0da798563dcd0621f045fa4454c203f307
pkt_sched: Fix warning false positives.

commit f54ba7798848ce1385a71b36a2c997422c82220a upstream.

GCC refuses to recognize that all error control flows do in fact
set err to something.

Add an explicit initialization to shut it up.

net/sched/sch_drr.c: In function ‘drr_enqueue’:
net/sched/sch_drr.c:359:11: warning: ‘err’ may be used uninitialized in this function [-Wmaybe-uninitialized]
net/sched/sch_qfq.c: In function ‘qfq_enqueue’:
net/sched/sch_qfq.c:885:11: warning: ‘err’ may be used uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
net/sched/sch_drr.c
net/sched/sch_qfq.c