[PATCH 1/1] lmb: add missing fallthrough in lmb_alloc_mem()

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Tue Jul 8 14:12:51 CEST 2025


Add fallthrough to clarify the intent.

Addresses-Coverity-ID: CID 569481: Control flow issues (MISSING_BREAK)
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
---
 lib/lmb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/lmb.c b/lib/lmb.c
index 45b26512a5b..e5a0677e3f9 100644
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -762,6 +762,7 @@ int lmb_alloc_mem(enum lmb_mem_type type, u64 align, phys_addr_t *addr,
 	switch (type) {
 	case LMB_MEM_ALLOC_ANY:
 		*addr = LMB_ALLOC_ANYWHERE;
+		fallthrough;
 	case LMB_MEM_ALLOC_MAX:
 		ret = _lmb_alloc_base(size, align, addr, flags);
 		break;
-- 
2.48.1



More information about the U-Boot mailing list