From d3de2bb882544798eae3958cfb458b1fe001988b Mon Sep 17 00:00:00 2001
From: Stefan Wahren <stefan.wahren@i2se.com>
Date: Fri, 26 May 2017 00:26:11 +0200
Subject: [PATCH] staging: vchiq_core: Use return value of mutex_lock_killable directly
Git-commit: d3de2bb882544798eae3958cfb458b1fe001988b
Patch-mainline: v4.13-rc1
References: FATE#324827
Instead of saving the return value of mutex_lock_killable in a
local variable we could use the value directly.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Takashi Iwai <tiwai@suse.de>
---
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
@@ -1375,7 +1375,6 @@ resolve_bulks(VCHIQ_SERVICE_T *service,
{
VCHIQ_STATE_T *state = service->state;
int resolved = 0;
- int rc;
while ((queue->process != queue->local_insert) &&
(queue->process != queue->remote_insert)) {
@@ -1391,8 +1390,7 @@ resolve_bulks(VCHIQ_SERVICE_T *service,
WARN_ON(!((int)(queue->local_insert - queue->process) > 0));
WARN_ON(!((int)(queue->remote_insert - queue->process) > 0));
- rc = mutex_lock_killable(&state->bulk_transfer_mutex);
- if (rc != 0)
+ if (mutex_lock_killable(&state->bulk_transfer_mutex))
break;
vchiq_transfer_bulk(bulk);