The change to return an error requires all return patsh to be checked. The two in lines 220 and 228 (new version of file) return 0 on failure which is clearly incorrect and masks a defect in bl2_main.c