mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
staging: vchiq_arm: make vchiq_shutdown_internal return void
The function vchiq_shutdown_internal always returns VCHIQ_SUCCESS. So change the return type to void and simplify the logic in vchiq_shutdown. Signed-off-by: Stefan Wahren <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
1 parent
1d702f5962
commit
e39ff0e4ea
3 files changed
+13
-18
No files matched your search
@@ -202,33 +202,30 @@ EXPORT_SYMBOL(vchiq_initialise);
|
||||
|
||||
enum vchiq_status vchiq_shutdown(struct vchiq_instance *instance)
|
||||
{
|
||||
enum vchiq_status status;
|
||||
enum vchiq_status status = VCHIQ_SUCCESS;
|
||||
struct vchiq_state *state = instance->state;
|
||||
struct bulk_waiter_node *waiter, *next;
|
||||
|
||||
if (mutex_lock_killable(&state->mutex))
|
||||
return VCHIQ_RETRY;
|
||||
|
||||
/* Remove all services */
|
||||
status = vchiq_shutdown_internal(state, instance);
|
||||
vchiq_shutdown_internal(state, instance);
|
||||
|
||||
mutex_unlock(&state->mutex);
|
||||
|
||||
vchiq_log_trace(vchiq_core_log_level,
|
||||
"%s(%p): returning %d", __func__, instance, status);
|
||||
|
||||
if (status == VCHIQ_SUCCESS) {
|
||||
struct bulk_waiter_node *waiter, *next;
|
||||
|
||||
list_for_each_entry_safe(waiter, next,
|
||||
&instance->bulk_waiter_list, list) {
|
||||
list_del(&waiter->list);
|
||||
vchiq_log_info(vchiq_arm_log_level,
|
||||
"bulk_waiter - cleaned up %pK for pid %d",
|
||||
waiter, waiter->pid);
|
||||
kfree(waiter);
|
||||
}
|
||||
kfree(instance);
|
||||
list_for_each_entry_safe(waiter, next,
|
||||
&instance->bulk_waiter_list, list) {
|
||||
list_del(&waiter->list);
|
||||
vchiq_log_info(vchiq_arm_log_level,
|
||||
"bulk_waiter - cleaned up %pK for pid %d",
|
||||
waiter, waiter->pid);
|
||||
kfree(waiter);
|
||||
}
|
||||
kfree(instance);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -2922,7 +2922,7 @@ vchiq_connect_internal(struct vchiq_state *state, struct vchiq_instance *instanc
|
||||
return VCHIQ_SUCCESS;
|
||||
}
|
||||
|
||||
enum vchiq_status
|
||||
void
|
||||
vchiq_shutdown_internal(struct vchiq_state *state, struct vchiq_instance *instance)
|
||||
{
|
||||
struct vchiq_service *service;
|
||||
@@ -2935,8 +2935,6 @@ vchiq_shutdown_internal(struct vchiq_state *state, struct vchiq_instance *instan
|
||||
(void)vchiq_remove_service(service->handle);
|
||||
unlock_service(service);
|
||||
}
|
||||
|
||||
return VCHIQ_SUCCESS;
|
||||
}
|
||||
|
||||
enum vchiq_status
|
||||
|
||||
@@ -563,7 +563,7 @@ vchiq_terminate_service_internal(struct vchiq_service *service);
|
||||
extern void
|
||||
vchiq_free_service_internal(struct vchiq_service *service);
|
||||
|
||||
extern enum vchiq_status
|
||||
extern void
|
||||
vchiq_shutdown_internal(struct vchiq_state *state, struct vchiq_instance *instance);
|
||||
|
||||
extern void
|
||||
|
||||
Reference in new issue
Block a user