diff options
| author | Sang-Hoon Choi <csh0052@gmail.com> | 2026-09-22 03:49:28 +0900 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-09-28 16:27:08 -0700 |
| commit | 087827628ad3d9cab31365114e8b4d6d153dfa36 (patch) | |
| tree | 63be4b5ef8203c4f59251306cb351fe23d88fb10 /tools/lib/python/kdoc/python_version.py | |
| parent | 22b9a9e5e2460f19709b62b95ea4343971ddbaf5 (diff) | |
hinic3: handle auxiliary device ID allocation failure
hinic3_init_hwdev() stores the result of hinic3_adev_idx_alloc() in
hwdev->dev_id without checking for an error. If ID allocation fails but
the remaining initialization succeeds, hinic3_add_one_adev() uses the
negative error code as the auxiliary device ID instead of a reserved ID.
Return the allocation error before initializing the hardware. Add an
unwind label that clears pci_adapter->hwdev and frees the allocation
without attempting to release an ID that was never allocated.
Cc: stable+noautosel@kernel.org # untested fix to unlikely driver error path
Reported-by: Changyul Lee <lcy8047@gmail.com>
Signed-off-by: Sang-Hoon Choi <csh0052@gmail.com>
Link: https://patch.msgid.link/179001656835.91284.3719235813225229273.idr-bug-81@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
