git: 3907feff7ab7 - main - smbios: Print an error on memory map failure on identify

From: Olivier Certner <olce_at_FreeBSD.org>
Date: Fri, 07 Mar 2025 16:44:40 UTC
The branch main has been updated by olce:

URL: https://cgit.FreeBSD.org/src/commit/?id=3907feff7ab732b918ba3f5993e7a6718fffea14

commit 3907feff7ab732b918ba3f5993e7a6718fffea14
Author:     Olivier Certner <olce@FreeBSD.org>
AuthorDate: 2025-03-03 08:50:49 +0000
Commit:     Olivier Certner <olce@FreeBSD.org>
CommitDate: 2025-03-07 16:42:46 +0000

    smbios: Print an error on memory map failure on identify
    
    Consistently with what the probe and attach methods are doing.
    
    MFC after:      2 weeks
    Sponsored by:   The FreeBSD Foundation
---
 sys/dev/smbios/smbios.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sys/dev/smbios/smbios.c b/sys/dev/smbios/smbios.c
index 561196a3d4b6..9e942335e985 100644
--- a/sys/dev/smbios/smbios.c
+++ b/sys/dev/smbios/smbios.c
@@ -117,8 +117,10 @@ smbios_identify (driver_t *driver, device_t parent)
 		return;
 
 	ptr = pmap_mapbios(addr, map_size);
-	if (ptr == NULL)
+	if (ptr == NULL) {
+		printf("smbios: Unable to map memory.\n");
 		return;
+	}
 	if (map_size == sizeof(*eps3)) {
 		eps3 = ptr;
 		length = eps3->length;