MIPS: bootm: tiny fixes in do_bootm_elf()
cover MIPS: bootm: tiny fixes in do_bootm_elf()
Denis Orlov (3):
MIPS: bootm: do not free fdt pointer that contains an error
MIPS: bootm: do not leak memory on error in of_overlay_load_firmware()
MIPS: bootm: remove unnecessary phys/virt conversions
arch/mips/lib/bootm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
Signature · 1 line
2.30.2
PATCH 1/3 MIPS: bootm: do not free fdt pointer that contains an error
Also add a proper error message.
--- arch/mips/lib/bootm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/mips/lib/bootm.c +2 -2
@@ -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",
Signature · 1 line
2.30.2
PATCH 2/3 MIPS: bootm: do not leak memory on error in of_overlay_load_firmware()
In reply to Denis Orlov--- arch/mips/lib/bootm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/lib/bootm.c +1 -1
@@ -69,7 +69,7 @@ static int do_bootm_elf(struct image_data *data) ret =of_overlay_load_firmware ();if (ret) -return ret; + goto bootm_free_fdt;shutdown_barebox ();
Signature · 1 line
2.30.2
PATCH 3/3 MIPS: bootm: remove unnecessary phys/virt conversions
In reply to Denis OrlovThey are not doing anything there - we should already have proper virtual addresses represented by those pointers.
--- arch/mips/lib/bootm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/mips/lib/bootm.c +2 -2
@@ -62,7 +62,7 @@ static int do_bootm_elf(struct image_data *data) }pr_info ("Starting application at 0x%08lx, dts 0x%08lx...\n" , -phys_to_virt (data->os_address), data->of_root_node); + data->os_address, data->of_root_node);if (data->dryrun) goto bootm_free_fdt;
@@ -75,7 +75,7 @@ static int do_bootm_elf(struct image_data *data) entry = (void *) (unsigned long ) data->os_address; -entry (-2 ,phys_to_virt ((unsigned long )fdt)); +entry (-2 , fdt);pr_err ("ELF application terminated\n" ); ret = -EINVAL ;
Signature · 1 line
2.30.2
Sascha Hauer
AppliedQuoted 7 lines · Denis Orlov
Denis Orlov (3):
MIPS: bootm: do not free fdt pointer that contains an error
MIPS: bootm: do not leak memory on error inof_overlay_load_firmware()
MIPS: bootm: remove unnecessary phys/virt conversionsarch/mips/lib/bootm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
Applied, thanks
Sascha
Signature · 4 lines
Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |