mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
RDMA/hfi1: Align probe error unwinding with device removal
init_one() defers handling errors from hfi1_init() and hfi1_register_ib_device() to a combined block. This allows IB registration to run after device initialization has failed. Cleanup then depends on two unrelated error values. The late probe failure path also differs from the common teardown in remove_one(), even though both release the same initialized hardware and driver resources. Maintaining separate sequences obscures ownership and allows the paths to drift whenever initialization changes. Unwind at each failing stage and keep late probe teardown ordered like remove_one(), so partial initialization releases exactly the resources it owns and normal removal remains the reference cleanup flow. Link: https://patch.msgid.link/20260708-clean-init-one-hfi1-v1-13-b9e9641268a5@nvidia.com Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
This commit is contained in:
parent
bb18740b30
commit
e26c48cf23
1 changed files with 16 additions and 29 deletions
Loading…
Add table
Add a link
Reference in a new issue