[FOSS_TLK][lib][ote][otf] check te_oper_get_param_mem error

Change-Id: Ie88319e2b38a3413d41cbd9c6780a7662009f945
Reviewed-on: http://git-master/r/715758
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>
diff --git a/service/ote_otf.c b/service/ote_otf.c
index 0e45ab1..4416ac5 100644
--- a/service/ote_otf.c
+++ b/service/ote_otf.c
@@ -56,8 +56,8 @@
 		/* open a OTF service session */
 		err = te_open_session(*otfSession, &uuid, &operation);
 		if (err != OTE_SUCCESS) {
-			te_fprintf(TE_ERR,"%s failed with err (%d)\n", __func__,
-				err);
+			te_fprintf(TE_ERR,"%s: te_open_session failed with err (%d)\n",
+					__func__, err);
 			goto exit;
 		}
 		otf_session_valid = 1;
@@ -99,9 +99,16 @@
 
 	err = te_launch_operation(otfSession, &operation);
 	if (err != OTE_SUCCESS) {
-		te_fprintf(TE_ERR, "%s failed with err (%d)\n", __func__, err);
+		te_fprintf(TE_ERR, "%s: te_launch_operation failed with err (%d)\n",
+				__func__, err);
 	}
-	te_oper_get_param_int(&operation, 1, keySlot);
+
+	err = te_oper_get_param_int(&operation, 1, keySlot);
+	if (err != OTE_SUCCESS) {
+		te_fprintf(TE_ERR, "%s: te_oper_get_param_int failed with err (%d)\n",
+				__func__, err);
+	}
+
 	te_operation_reset(&operation);
 	return err;
 }
@@ -145,7 +152,8 @@
 	te_oper_set_command(&operation, OTF_ERASE_AES_KEY);
 	err = te_launch_operation(otfSession, &operation);
 	if (err != OTE_SUCCESS) {
-		te_fprintf(TE_ERR, "%s failed with err (%d)\n", __func__, err);
+		te_fprintf(TE_ERR, "%s: te_launch_operation failed with err (%d)\n",
+				__func__, err);
 	}
 
 	te_operation_reset(&operation);