]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
kho: remove unnecessary WARN_ON(err) in kho_populate()
authorRan Xiaokai <ran.xiaokai@zte.com.cn>
Thu, 12 Feb 2026 11:11:46 +0000 (11:11 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 12 Feb 2026 23:45:58 +0000 (15:45 -0800)
The following pr_warn() provides detailed error and location information,
WARN_ON(err) adds no additional debugging value, so remove the redundant
WARN_ON() call.

Link: https://lkml.kernel.org/r/20260212111146.210086-3-ranxiaokai627@163.com
Signed-off-by: Ran Xiaokai <ran.xiaokai@zte.com.cn>
Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
Reviewed-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Cc: Alexander Graf <graf@amazon.com>
Cc: Mike Rapoport <rppt@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/liveupdate/kexec_handover.c

index af82d8862dd73307a89875b2da757a6a38da9a1f..95601623b4d637ea80c68b6de997e882ad6c1da2 100644 (file)
@@ -1507,7 +1507,7 @@ void __init kho_populate(phys_addr_t fdt_phys, u64 fdt_len,
 
                memblock_add(area->addr, size);
                err = memblock_mark_kho_scratch(area->addr, size);
-               if (WARN_ON(err)) {
+               if (err) {
                        pr_warn("failed to mark the scratch region 0x%pa+0x%pa: %pe",
                                &area->addr, &size, ERR_PTR(err));
                        goto unmap_scratch;