net: hns: Simplify the exception sequence in hns_ppe_init()
authorKejian Yan <yankejian@huawei.com>
Sat, 1 Apr 2017 11:03:45 +0000 (12:03 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Apr 2017 21:48:43 +0000 (14:48 -0700)
commita2185587ade79b9649639721aa21c4cefc1aea6b
tree36f64dfd763c714186d7e88273d80426d1c4dbba
parentd592a4a4b9f2727efd8d7718bb5c9ae0d03614bd
net: hns: Simplify the exception sequence in hns_ppe_init()

We need to free all ppe submodule if it fails to initialize ppe by
any fault, so this patch will free all ppe resource before
hns_ppe_init() returns exception situation

Reported-by: JinchuanTian <tianjinchuan1@huawei.com>
Signed-off-by: Kejian Yan <yankejian@huawei.com>
Reviewed-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c