]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
staging: sm750fb: add missing pci_release_region on error and removal
authorArtem Lytkin <iprintercanon@gmail.com>
Mon, 16 Feb 2026 20:20:38 +0000 (20:20 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Feb 2026 15:32:56 +0000 (16:32 +0100)
commit8225489ddb900656cc21573b4e1b00c9181fd777
tree15d8e5782fcc45d9977d64bac37f39df508e1088
parent6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
staging: sm750fb: add missing pci_release_region on error and removal

hw_sm750_map() calls pci_request_region() but never releases the
region on error paths or in lynxfb_pci_remove(). This causes a
resource leak that prevents the PCI region from being mapped again
after driver removal or a failed probe. A TODO comment in the code
acknowledges this missing cleanup.

Restructure the error handling in hw_sm750_map() to properly release
the PCI region on ioremap failures, and add pci_release_region() to
lynxfb_pci_remove().

Signed-off-by: Artem Lytkin <iprintercanon@gmail.com>
Cc: stable <stable@kernel.org>
Link: https://patch.msgid.link/20260216202038.1828-1-iprintercanon@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/sm750fb/sm750.c
drivers/staging/sm750fb/sm750_hw.c