diff options
| author | Aniket Randive <aniket.randive@oss.qualcomm.com> | 2026-08-31 16:42:59 +0530 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-09-23 14:44:26 +0200 |
| commit | 37d7703dbd6ab1303be7be8d1b18df26892a0ed9 (patch) | |
| tree | 27df09d2069f9d6fc4b120ea539a48e838243f5e /tools/lib/python | |
| parent | fbce8df31104c2a12e020b8adc402927700dc041 (diff) | |
serial: qcom-geni: Fix port_ida handling for console and probe errors
The console port uses a fixed line number and is not allocated from
port_ida. However, qcom_geni_serial_remove() unconditionally frees the
line number for all ports, including the console port.
Skip ida_free() for console ports so that only IDs allocated from
port_ida are returned.
Also release allocated IDs from the common probe error path. Currently,
IDs are freed only on the wake-IRQ failure path, causing leaks when
probe fails after a successful allocation. Move the ida_free() call to
the common error path and guard it for console ports.
Route resources_init() failures through the common error path so the
allocated line number is released correctly.
Allocate the port structure before calling ida_alloc_range() in
get_port_from_line(). This prevents IDs from being left allocated when
memory allocation fails.
Signed-off-by: Aniket Randive <aniket.randive@oss.qualcomm.com>
Link: https://patch.msgid.link/20260828-master-v1-1-1f8afa5f82c2@oss.qualcomm.com
Reviewed-by: Praveen Talari <praveen.talari@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://patch.msgid.link/20260831-master-v2-1-0032ec7fd1ca@oss.qualcomm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
