Skip to content

Commit f7ccc35

Browse files
andreas-schwabpalmer-dabbelt
authored andcommitted
arch: riscv: fix logic error in parse_dtb
The function early_init_dt_scan returns true if a DTB was detected. Fixes: 8fd6e05 ("arch: riscv: support kernel command line forcing when no DTB passed") Signed-off-by: Andreas Schwab <schwab@suse.de> Reviewed-by: Atish Patra <atish.patra@wdc.com> Reviewed-by: Paul Walmsley <paul.walmsley@sifive.com> Tested-by: Paul Walmsley <paul.walmsley@sifive.com> # FU540 HiFive-U BBL Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
1 parent fbdc619 commit f7ccc35

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎arch/riscv/kernel/setup.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ asmlinkage void __init setup_vm(void)
140140

141141
void __init parse_dtb(unsigned int hartid, void *dtb)
142142
{
143-
if (!early_init_dt_scan(__va(dtb)))
143+
if (early_init_dt_scan(__va(dtb)))
144144
return;
145145

146146
pr_err("No DTB passed to the kernel\n");

0 commit comments

Comments
 (0)