net/sched: cbs: Fix error path of cbs_module_init
authorYueHaibing <yuehaibing@huawei.com>
Fri, 21 Jun 2019 13:44:37 +0000 (21:44 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jan 2020 13:50:57 +0000 (14:50 +0100)
commit67da9350b39363dddf24bced64cfd0a41f01c956
tree5bad4ba3f136438bef8f411d46861f6514b91423
parent9b1b59b540ec38f9bce4ed1f9a68ea0a72c92c97
net/sched: cbs: Fix error path of cbs_module_init

[ Upstream commit 45d5cb137c3638b3a310f41b31d8e79daf647f14 ]

If register_qdisc fails, we should unregister
netdevice notifier.

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: e0a7683d30e9 ("net/sched: cbs: fix port_rate miscalculation")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/sched/sch_cbs.c