am 4e88f9be: Don\'t ignore errors from begin operation.
* commit '4e88f9be2b3bb3dcea43f338532882681ee77352':
Don't ignore errors from begin operation.
diff --git a/keystore/keystore.cpp b/keystore/keystore.cpp
index b36f65f..85289ad 100644
--- a/keystore/keystore.cpp
+++ b/keystore/keystore.cpp
@@ -2478,8 +2478,6 @@
}
}
keymaster_key_param_set_t inParams = {opParams.data(), opParams.size()};
- keymaster_key_param_set_t outParams = {NULL, 0};
- err = dev->begin(dev, purpose, &key, &inParams, &outParams, &handle);
// Create a keyid for this key.
keymaster::km_id_t keyid;
@@ -2501,6 +2499,9 @@
return;
}
+ keymaster_key_param_set_t outParams = {NULL, 0};
+ err = dev->begin(dev, purpose, &key, &inParams, &outParams, &handle);
+
// If there are too many operations abort the oldest operation that was
// started as pruneable and try again.
while (err == KM_ERROR_TOO_MANY_OPERATIONS && mOperationMap.hasPruneableOperation()) {