Commit 0fd0541b authored by Colin Ian King's avatar Colin Ian King Committed by Rafael J. Wysocki
Browse files

ACPI: APEI: EINJ: Fix check and iounmap of uninitialized pointer p



In the case where a request_mem_region call fails and pointer r is null
the error exit path via label 'out' will check for a non-null pointer
p and try to iounmap it. However, pointer p has not been assigned a
value at this point, so it may potentially contain any garbage value.
Fix this by ensuring pointer p is initialized to NULL.

Fixes: 1a35c883 ("ACPI: APEI: EINJ: Fix kernel test sparse warnings")
Signed-off-by: default avatarColin Ian King <colin.i.king@gmail.com>
Link: https://patch.msgid.link/20250624202937.523013-1-colin.i.king@gmail.com


Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent c13d38bc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment