mirror of
https://github.com/linux-msm/qdl.git
synced 2026-02-25 13:12:25 -08:00
qdl: Add a fix for read xml error
When xml has no last_sector, qdl will read xml failed. Add check to see if last_sector exists
This commit is contained in:
committed by
Bjorn Andersson
parent
bdcf93b4a3
commit
392394086d
@@ -97,7 +97,9 @@ static int load_program_tag(xmlNode *node, bool is_nand)
|
||||
|
||||
if (is_nand) {
|
||||
program->pages_per_block = attr_as_unsigned(node, "PAGES_PER_BLOCK", &errors);
|
||||
program->last_sector = attr_as_unsigned(node, "last_sector", &errors);
|
||||
if (NULL != xmlGetProp(node, (xmlChar *)"last_sector")) {
|
||||
program->last_sector = attr_as_unsigned(node, "last_sector", &errors);
|
||||
}
|
||||
} else {
|
||||
program->file_offset = attr_as_unsigned(node, "file_sector_offset", &errors);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user