Browse Source

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 <[email protected]>
Chen Minqiang 2 years ago
parent
commit
016a7bd558

+ 1 - 1
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
 

+ 1 - 0
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" ] && {