[PATCH] remove custom return values in vc04_services
Dan Carpenter
dan.carpenter at oracle.com
Wed Jul 13 04:09:08 PDT 2022
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
More information about the linux-arm-kernel
mailing list