Hi Markus,
Thank you for your thorough review of v3.
This v4 addresses all your comments:
- Added `Cc: stable@vger.kernel.org` to ensure the fix reaches stable
kernels.
- Refactored the duplicate ioremap error handling into a helper function
to improve code clarity and reduce duplication.
- Replaced manual mutex lock/unlock with `scoped_guard()`
for better safety and readability.
Regarding the `Fixes` tag: I've added a tag pointing to the
commit that originally introduced the driver.
At that time, the file
was located at drivers/media/video/saa7164/saa7164-core.c; the `Fixes` tag
correctly identifies the commit where the issue first appeared, regardless
of the later file move.
The patch adds missing error checks for two ioremap calls in
saa7164_dev_setup(). If either mapping fails, the function now properly
releases previously allocated PCI resources, removes the device from the
global list, and returns -ENODEV. This prevents potential null pointer
dereferences and ensures proper cleanup on failure.
Please review the updated patch. Thanks!
Wang Jun (1):
media: saa7164: add ioremap return checks and cleanups
drivers/media/pci/saa7164/saa7164-core.c | 41 +++++++++++++++++++++---
1 file changed, 37 insertions(+), 4 deletions(-)
--
2.43.0