[PATCH 1/3] MIPS: bootm: do not free fdt pointer that contains an error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Also add a proper error message.

Signed-off-by: Denis Orlov <denorl2009@xxxxxxxxx>
---
 arch/mips/lib/bootm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
index 655535737e..95e9dc0d7d 100644
--- a/arch/mips/lib/bootm.c
+++ b/arch/mips/lib/bootm.c
@@ -57,8 +57,8 @@ static int do_bootm_elf(struct image_data *data)
 
 	fdt = bootm_get_devicetree(data);
 	if (IS_ERR(fdt)) {
-		ret = PTR_ERR(fdt);
-		goto bootm_free_fdt;
+		pr_err("Failed to load dtb\n");
+		return PTR_ERR(fdt);
 	}
 
 	pr_info("Starting application at 0x%08lx, dts 0x%08lx...\n",
-- 
2.30.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux