[PATCH master 4/4] memory: correct return value in request_barebox_region stub

Ahmad Fatoum a.fatoum at pengutronix.de
Tue Apr 22 00:55:19 PDT 2025


From: Ahmad Fatoum <a.fatoum at barebox.org>

request_barebox_region is only meaningful in barebox proper and its PBL
stub returns an error pointer currently. The proper implementation
returns a NULL pointer on error though, so follow suit in the stub.

Signed-off-by: Ahmad Fatoum <a.fatoum at barebox.org>
---
 include/memory.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/memory.h b/include/memory.h
index 8c330e65c012..09c10b773fac 100644
--- a/include/memory.h
+++ b/include/memory.h
@@ -73,7 +73,7 @@ static inline struct resource *request_barebox_region(const char *name,
 					resource_size_t size)
 {
 
-		return ERR_PTR(-ENOSYS);
+		return NULL;
 }
 #endif
 
-- 
2.39.5




More information about the barebox mailing list