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

Sughosh Ganu sughosh.ganu at linaro.org
Tue Jul 8 14:32:34 CEST 2025


On Tue, 8 Jul 2025 at 17:43, Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
>
> 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(+)

Acked-by: Sughosh Ganu <sughosh.ganu at linaro.org>

-sughosh

>
> 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