]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: sim710: Fix resource leak by adding missing ioport_unmap() calls
authorHaotian Zhang <vulab@iscas.ac.cn>
Wed, 29 Oct 2025 03:25:55 +0000 (11:25 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:02:58 +0000 (14:02 +0100)
commit54a7e83112742d75c19226665a729113f16165ae
treeed422dc73c6e8890998c214fd62b0316223b731b
parent5c1fb3fd05da3d55b8cbc42d7d660b313cbdc936
scsi: sim710: Fix resource leak by adding missing ioport_unmap() calls

[ Upstream commit acd194d9b5bac419e04968ffa44351afabb50bac ]

The driver calls ioport_map() to map I/O ports in sim710_probe_common()
but never calls ioport_unmap() to release the mapping. This causes
resource leaks in both the error path when request_irq() fails and in
the normal device removal path via sim710_device_remove().

Add ioport_unmap() calls in the out_release error path and in
sim710_device_remove().

Fixes: 56fece20086e ("[PATCH] finally fix 53c700 to use the generic iomem infrastructure")
Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
Link: https://patch.msgid.link/20251029032555.1476-1-vulab@iscas.ac.cn
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/sim710.c