mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 10:20:17 -04:00
staging: vchiq_core: avoid ternary operator for set_service_state
There is already a check for service->sync, so use this instead of a separate ternary operator to update the service state. Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1642968143-19281-14-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d9bb2daa4f
commit
5b5a40986b
@@ -1521,15 +1521,17 @@ parse_open(struct vchiq_state *state, struct vchiq_header *header)
|
||||
if (queue_message_sync(state, NULL, openack_id, memcpy_copy_callback,
|
||||
&ack_payload, sizeof(ack_payload), 0) == VCHIQ_RETRY)
|
||||
goto bail_not_ready;
|
||||
|
||||
/* The service is now open */
|
||||
set_service_state(service, VCHIQ_SRVSTATE_OPENSYNC);
|
||||
} else {
|
||||
if (queue_message(state, NULL, openack_id, memcpy_copy_callback,
|
||||
&ack_payload, sizeof(ack_payload), 0) == VCHIQ_RETRY)
|
||||
goto bail_not_ready;
|
||||
}
|
||||
|
||||
/* The service is now open */
|
||||
set_service_state(service, service->sync ? VCHIQ_SRVSTATE_OPENSYNC
|
||||
: VCHIQ_SRVSTATE_OPEN);
|
||||
/* The service is now open */
|
||||
set_service_state(service, VCHIQ_SRVSTATE_OPEN);
|
||||
}
|
||||
}
|
||||
|
||||
/* Success - the message has been dealt with */
|
||||
|
||||
Reference in New Issue
Block a user