hos: homogenize return values
This commit is contained in:
@@ -766,11 +766,12 @@ static int _dump_emummc_raw_part(emmc_tool_gui_t *gui, int active_part, int part
|
||||
|
||||
int emummc_raw_derive_bis_keys()
|
||||
{
|
||||
// Generate BIS keys.
|
||||
hos_bis_keygen();
|
||||
|
||||
u8 *cal0_buff = malloc(SZ_64K);
|
||||
|
||||
// Generate BIS keys.
|
||||
if (hos_bis_keygen())
|
||||
goto error;
|
||||
|
||||
// Read and decrypt CAL0 for validation of working BIS keys.
|
||||
emmc_set_partition(EMMC_GPP);
|
||||
LIST_INIT(gpt);
|
||||
@@ -786,6 +787,7 @@ int emummc_raw_derive_bis_keys()
|
||||
// Check keys validity.
|
||||
if (memcmp(&cal0->magic, "CAL0", 4))
|
||||
{
|
||||
error:
|
||||
// Clear EKS keys.
|
||||
hos_eks_clear(HOS_MKEY_VER_MAX);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user