summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
authorJustin Chadwell <justin.chadwell@arm.com>2019-07-23 09:54:07 +0100
committerJustin Chadwell <justin.chadwell@arm.com>2019-08-06 13:06:03 +0100
commitfc6b626c6b6d17993764db9bc14c7c8457835854 (patch)
treefe3c534d858511e351c1415e6a8d1c7470279f27 /services
parent4249e8b94fde3dc41e867563f13b21f6b8296509 (diff)
Fix Coverity #343017, Missing unlock
All other returns from this function unlock the responses_lock, so we also should release the lock in this case. Change-Id: Ie2cfa8755723fed79e809f9480190d11f373a217 Signed-off-by: Justin Chadwell <justin.chadwell@arm.com>
Diffstat (limited to 'services')
-rw-r--r--services/std_svc/spm/spm_buffers.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/services/std_svc/spm/spm_buffers.c b/services/std_svc/spm/spm_buffers.c
index 3e0c9496..79398ba1 100644
--- a/services/std_svc/spm/spm_buffers.c
+++ b/services/std_svc/spm/spm_buffers.c
@@ -38,6 +38,8 @@ int spm_response_add(uint16_t client_id, uint16_t handle, uint32_t token,
struct sprt_response *resp = &(responses[i]);
if ((resp->is_valid == 1) && (resp->token == token)) {
+ spin_unlock(&responses_lock);
+
return -1;
}
}