From: Chen Minqiang Date: Sun, 18 Dec 2022 00:59:44 +0000 (+0800) Subject: mediatek: fix wrong return code in platform_check_image() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=016a7bd558183dae67e6ed3c29ee82d7b5c2f579;p=openwrt%2Fstaging%2Fblogic.git mediatek: fix wrong return code in platform_check_image() Ensure that the platform_check_image() function returns an error code. Signed-off-by: Chen Minqiang --- diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh index 93b202218a8b..9a389d59b1d4 100755 --- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh @@ -95,7 +95,7 @@ platform_check_image() { ;; *) nand_do_platform_check "$board" "$1" - return 0 + return $? ;; esac diff --git a/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh index d3d503dd1eff..e3c66a3b01a5 100755 --- a/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh @@ -74,6 +74,7 @@ platform_check_image() { totolink,a8000ru|\ xiaomi,redmi-router-ax6s) nand_do_platform_check "$board" "$1" + return $? ;; *) [ "$magic" != "d00dfeed" ] && {