diff options
author | Stefan Wahren <stefan.wahren@i2se.com> | 2021-04-11 20:11:31 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-04-12 11:41:21 +0200 |
commit | acdb1d908fdb31970569e3e65aaea05845c5001e (patch) | |
tree | 0e4f8f45c1761a7872facb3a0e44d32fefbc456d /drivers/staging/vc04_services | |
parent | 8333e5a95855163600a5cc6b4d7ea1ccf0542de3 (diff) | |
download | linux-stable-acdb1d908fdb31970569e3e65aaea05845c5001e.tar.gz linux-stable-acdb1d908fdb31970569e3e65aaea05845c5001e.tar.bz2 linux-stable-acdb1d908fdb31970569e3e65aaea05845c5001e.zip |
staging: vchiq_core: Simplify vchiq_send_remote_use*
There is no need for variable status. So drop it and improve readability.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1618164700-21150-2-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vc04_services')
-rw-r--r-- | drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c index 0b0a97bfd01c..271d498336ac 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -3702,24 +3702,22 @@ vchiq_loud_error_footer(void) enum vchiq_status vchiq_send_remote_use(struct vchiq_state *state) { - enum vchiq_status status = VCHIQ_RETRY; + if (state->conn_state == VCHIQ_CONNSTATE_DISCONNECTED) + return VCHIQ_RETRY; - if (state->conn_state != VCHIQ_CONNSTATE_DISCONNECTED) - status = queue_message(state, NULL, - VCHIQ_MAKE_MSG(VCHIQ_MSG_REMOTE_USE, 0, 0), - NULL, NULL, 0, 0); - return status; + return queue_message(state, NULL, + VCHIQ_MAKE_MSG(VCHIQ_MSG_REMOTE_USE, 0, 0), + NULL, NULL, 0, 0); } enum vchiq_status vchiq_send_remote_use_active(struct vchiq_state *state) { - enum vchiq_status status = VCHIQ_RETRY; + if (state->conn_state == VCHIQ_CONNSTATE_DISCONNECTED) + return VCHIQ_RETRY; - if (state->conn_state != VCHIQ_CONNSTATE_DISCONNECTED) - status = queue_message(state, NULL, - VCHIQ_MAKE_MSG(VCHIQ_MSG_REMOTE_USE_ACTIVE, 0, 0), - NULL, NULL, 0, 0); - return status; + return queue_message(state, NULL, + VCHIQ_MAKE_MSG(VCHIQ_MSG_REMOTE_USE_ACTIVE, 0, 0), + NULL, NULL, 0, 0); } void vchiq_log_dump_mem(const char *label, u32 addr, const void *void_mem, |