mediatek: fix wrong return code in platform_check_image()
authorChen Minqiang <ptpt52@gmail.com>
Sun, 18 Dec 2022 00:59:44 +0000 (08:59 +0800)
committerDaniel Golle <daniel@makrotopia.org>
Sun, 29 Jan 2023 01:02:45 +0000 (01:02 +0000)
Ensure that the platform_check_image() function returns an error code.

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh

index 93b202218a8b7fdb10d84d8ce2fa418a8ad3eadb..9a389d59b1d4ad4d92c2ad3d2c1c01c5d2b7e0f6 100755 (executable)
@@ -95,7 +95,7 @@ platform_check_image() {
                ;;
        *)
                nand_do_platform_check "$board" "$1"
-               return 0
+               return $?
                ;;
        esac
 
index d3d503dd1eff4e9b2b9f36277986fbce9209242c..e3c66a3b01a51574ae628484dc5aacfddd42f05f 100755 (executable)
@@ -74,6 +74,7 @@ platform_check_image() {
        totolink,a8000ru|\
        xiaomi,redmi-router-ax6s)
                nand_do_platform_check "$board" "$1"
+               return $?
                ;;
        *)
                [ "$magic" != "d00dfeed" ] && {