lkml.org 
[lkml]   [2022]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] remove custom return values in vc04_services
On Tue, Jul 12, 2022 at 02:19:28PM -0400, Joel Slebodnick wrote:
> @@ -3264,27 +3260,25 @@ release_message_sync(struct vchiq_state *state, struct vchiq_header *header)
> remote_event_signal(&state->remote->sync_release);
> }
>
> -enum vchiq_status
> +int
> vchiq_get_peer_version(unsigned int handle, short *peer_version)
> {
> - enum vchiq_status status = VCHIQ_ERROR;
> + int status = -EINVAL;
> struct vchiq_service *service = find_service_by_handle(handle);
>
> if (!service)
> goto exit;
>
> - if (vchiq_check_service(service) != VCHIQ_SUCCESS)
> + if (vchiq_check_service(service))
> goto exit;
>
> if (!peer_version)
> goto exit;
>
> *peer_version = service->peer_version;
> - status = VCHIQ_SUCCESS;
> + status = 0;
>
> exit:
> - if (service)
> - vchiq_service_put(service);

Too aggressive with the delete key.

> return status;
> }

regards,
dan carpenter



\
 
 \ /
  Last update: 2022-07-13 13:11    [W:1.234 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site