sch_netem: return errcode before setting params
authorYang Yingliang <yangyingliang@huawei.com>
Fri, 14 Feb 2014 02:30:41 +0000 (10:30 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 14 Feb 2014 05:15:20 +0000 (00:15 -0500)
commit54a4b05cd281a352d803417a98a72878fb0802cf
treef75291053c03b191ab3d8bb5ef51ca57f47e7de0
parentd4f2fa6ad61ec1db713569a179183df4d0fc6ae7
sch_netem: return errcode before setting params

get_dist_table() and get_loss_clg() may be failed. These
two functions should be called after setting the members
of qdisc_priv(sch), or it will break the old settings while
either of them is failed.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_netem.c