spl: refactor to use R_TRY

This commit is contained in:
Michael Scire 2019-06-17 09:00:15 -07:00
parent 1c503d59b5
commit a0cf3bbed8
2 changed files with 13 additions and 46 deletions

View file

@ -129,11 +129,9 @@ class SecureMonitorWrapper {
}
Result Allocate() {
Result rc = this->secmon_wrapper->AllocateAesKeyslot(&this->slot, this);
if (R_SUCCEEDED(rc)) {
this->has_slot = true;
}
return rc;
R_TRY(this->secmon_wrapper->AllocateAesKeyslot(&this->slot, this));
this->has_slot = true;
return ResultSuccess;
}
};
};