* [PATCH] mm/memblock: simplify reserve_mem_init error handling
@ 2026-08-21 3:32 Hongfu Li
2026-08-22 3:23 ` Sang-Heon Jeon
0 siblings, 1 reply; 2+ messages in thread
From: Hongfu Li @ 2026-08-21 3:32 UTC (permalink / raw)
To: rppt, akpm
Cc: graf, pasha.tatashin, linux-mm, linux-kernel, hongfu.li,
Hongfu Li
From: Hongfu Li <lihongfu@kylinos.cn>
Return prepare_kho_fdt() directly instead of assigning to a local and
returning it on both success and failure paths.
Signed-off-by: Hongfu Li <lihongfu@kylinos.cn>
---
mm/memblock.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/mm/memblock.c b/mm/memblock.c
index 777c69f05400..7079b93ec730 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -2616,15 +2616,10 @@ static int __init prepare_kho_fdt(void)
static int __init reserve_mem_init(void)
{
- int err;
-
if (!kho_is_enabled() || !reserved_mem_count)
return 0;
- err = prepare_kho_fdt();
- if (err)
- return err;
- return err;
+ return prepare_kho_fdt();
}
late_initcall(reserve_mem_init);
--
2.54.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] mm/memblock: simplify reserve_mem_init error handling
2026-08-21 3:32 [PATCH] mm/memblock: simplify reserve_mem_init error handling Hongfu Li
@ 2026-08-22 3:23 ` Sang-Heon Jeon
0 siblings, 0 replies; 2+ messages in thread
From: Sang-Heon Jeon @ 2026-08-22 3:23 UTC (permalink / raw)
To: Hongfu Li
Cc: Mike Rapoport, Andrew Morton, Alexander Graf, Pasha Tatashin,
Hongfu Li, linux-mm, linux-kernel
On Fri, Aug 21, 2026 at 11:32:30AM +0800, Hongfu Li wrote:
> Return prepare_kho_fdt() directly instead of assigning to a local and
> returning it on both success and failure paths.
Thanks for the patch, but the same change was already posted [1].
As mentioned in the cover letter, I can send it as a separate patch
if needed.
[1] https://lore.kernel.org/all/20260723184538.3888637-37-ekffu200098@gmail.com/
Best Regards,
Sang-Heon Jeon
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-22 3:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-21 3:32 [PATCH] mm/memblock: simplify reserve_mem_init error handling Hongfu Li
2026-08-22 3:23 ` Sang-Heon Jeon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox