Commit 62022d5206a284e8fb7f205b4baa7f2550ee9a35
Committed by
Tom Rini
1 parent
27ce696538
Exists in
v2017.01-smarct4x
and in
29 other branches
arm64: booti: add missing unmap_sysmem()
Make sure to call unmap_sysmem() for address allocated by map_sysmem() before leaving the function; however this patch gives no impact on the behavior because map_sysmem()/unmap_sysmem() does nothing except on Sandbox. Sandbox never runs this code because "booti" is a command for booting ARM64 kernel image. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Showing 1 changed file with 5 additions and 0 deletions Side-by-side Diff
cmd/bootm.c
... | ... | @@ -673,6 +673,9 @@ |
673 | 673 | * correct location and then move the image there. |
674 | 674 | */ |
675 | 675 | dst = gd->bd->bi_dram[0].start + le32_to_cpu(ih->text_offset); |
676 | + | |
677 | + unmap_sysmem(ih); | |
678 | + | |
676 | 679 | if (images->ep != dst) { |
677 | 680 | void *src; |
678 | 681 | |
... | ... | @@ -716,6 +719,8 @@ |
716 | 719 | ih = (struct Image_header *)map_sysmem(images->ep, 0); |
717 | 720 | |
718 | 721 | lmb_reserve(&images->lmb, images->ep, le32_to_cpu(ih->image_size)); |
722 | + | |
723 | + unmap_sysmem(ih); | |
719 | 724 | |
720 | 725 | /* |
721 | 726 | * Handle the BOOTM_STATE_FINDOTHER state ourselves as we do not |