diff options
Diffstat (limited to 'target/linux/generic/files')
-rw-r--r-- | target/linux/generic/files/block/partitions/fit.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/target/linux/generic/files/block/partitions/fit.c b/target/linux/generic/files/block/partitions/fit.c index 27e44a4af4..a0aa0eadf5 100644 --- a/target/linux/generic/files/block/partitions/fit.c +++ b/target/linux/generic/files/block/partitions/fit.c @@ -92,8 +92,11 @@ int parse_fit_partitions(struct parsed_partitions *state, u64 fit_start_sector, return -ERANGE; page = read_mapping_page(mapping, fit_start_sector >> (PAGE_SHIFT - SECTOR_SHIFT), NULL); - if (!page) - return -ENOMEM; + if (IS_ERR(page)) + return -EFAULT; + + if (PageError(page)) + return -EFAULT; init_fit = page_address(page); |