diff options
| author | Rosen Penev <rosenp@gmail.com> | 2026-06-26 15:52:28 -0700 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2026-06-30 12:19:07 +0200 |
| commit | dbf803bc4a8b0522c9a12560c20905a5952d1cb9 (patch) | |
| tree | 710c3facb3003f51cc149988de62218b715be35c /rust/zerocopy/git@git.tavy.me:linux-stable.git | |
| parent | 39139b1c1c2b614096519b526112c726adb12ff0 (diff) | |
net: gianfar: dispose irq mappings on probe failure and device removal
irq_of_parse_and_map() creates irqdomain mappings that should be
balanced with irq_dispose_mapping(). The driver never called
irq_dispose_mapping(), leaking mappings on probe failure and
device removal.
Fix by adding irq_dispose_mapping() in free_gfar_dev() and
expanding its loop from priv->num_grps to MAXGROUPS so the
error path also catches partially-initialized groups. All
irqinfo pointers are pre-initialized to NULL in gfar_of_init(),
making the NULL-guarded walk in free_gfar_dev() safe for every
scenario.
gfar_parse_group() itself is left as a simple parse function
with no resource management; cleanup is centralized in the
caller's error path.
Assisted-by: opencode:big-pickle
Fixes: b31a1d8b4151 ("gianfar: Convert gianfar to an of_platform_driver")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://patch.msgid.link/20260626225228.427392-1-rosenp@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'rust/zerocopy/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions
