sfc: don't unregister flow_indr if it was never registered
authorEdward Cree <ecree.xilinx@gmail.com>
Tue, 15 Aug 2023 15:57:27 +0000 (16:57 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 17 Aug 2023 18:31:07 +0000 (11:31 -0700)
commitfa165e1949976704500a442faeef8d9596faee76
treed35b8f5c3737dadb6f1cd5bed955af14353f3c71
parent23d775f12dcd23d052a4927195f15e970e27ab26
sfc: don't unregister flow_indr if it was never registered

In efx_init_tc(), move the setting of efx->tc->up after the
 flow_indr_dev_register() call, so that if it fails, efx_fini_tc()
 won't call flow_indr_dev_unregister().

Fixes: 5b2e12d51bd8 ("sfc: bind indirect blocks for TC offload on EF100")
Suggested-by: Pieter Jansen van Vuuren <pieter.jansen-van-vuuren@amd.com>
Reviewed-by: Martin Habets <habetsm.xilinx@gmail.com>
Signed-off-by: Edward Cree <ecree.xilinx@gmail.com>
Link: https://lore.kernel.org/r/a81284d7013aba74005277bd81104e4cfbea3f6f.1692114888.git.ecree.xilinx@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/sfc/tc.c