summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuo Ji <ji.luo@nxp.com>2018-01-24 19:01:24 +0800
committerLuo Ji <ji.luo@nxp.com>2018-01-24 19:01:24 +0800
commit777f3b0e3c606f8a3b760cbf46758027a16d1f85 (patch)
tree8f6dcebf7e6c7768ee0c2954e388990758d21881
parentda365863b1e3b23f7a6eb9669098731142cf1a15 (diff)
MA-11226 [Android] Set active slot fail after flashing bootloader
Flash bootloader will switch the mmc hwpart to boot0 partition which will cause errors when read/write blocks from user partition. Fix this bug by switching hwpart to user partition before read/write user partition every time. Change-Id: I5e3405de04e22db352efa59f0286e5c5c4697ac5 Signed-off-by: Luo Ji <ji.luo@nxp.com>
-rw-r--r--lib/avb/fsl/fsl_avb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/avb/fsl/fsl_avb.c b/lib/avb/fsl/fsl_avb.c
index 59c7c0af96..567780d2f0 100644
--- a/lib/avb/fsl/fsl_avb.c
+++ b/lib/avb/fsl/fsl_avb.c
@@ -62,7 +62,7 @@ static struct blk_desc *get_mmc_desc(void) {
assert(buffer != NULL && out_num_read != NULL);
- if (!fs_dev_desc && (fs_dev_desc = get_mmc_desc()) == NULL) {
+ if ((fs_dev_desc = get_mmc_desc()) == NULL) {
ERR("mmc device not found\n");
return AVB_IO_RESULT_ERROR_NO_SUCH_PARTITION;
}
@@ -145,7 +145,7 @@ fail:
assert(buffer != NULL && out_num_read != NULL);
- if (!fs_dev_desc && (fs_dev_desc = get_mmc_desc()) == NULL) {
+ if ((fs_dev_desc = get_mmc_desc()) == NULL) {
ERR("mmc device not found\n");
return AVB_IO_RESULT_ERROR_NO_SUCH_PARTITION;
}
@@ -268,7 +268,7 @@ fail:
assert(buffer != NULL);
- if (!fs_dev_desc && (fs_dev_desc = get_mmc_desc()) == NULL) {
+ if ((fs_dev_desc = get_mmc_desc()) == NULL) {
ERR("mmc device not found\n");
return AVB_IO_RESULT_ERROR_NO_SUCH_PARTITION;
}