[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220713110908.GR2338@kadam>
Date: Wed, 13 Jul 2022 14:09:08 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Joel Slebodnick <jslebodn@...hat.com>
Cc: linux-kernel@...r.kernel.org, gregkh@...uxfoundation.org,
f.fainelli@...il.com, rjui@...adcom.com, sbranden@...adcom.com,
bcm-kernel-feedback-list@...adcom.com, nsaenz@...nel.org,
athierry@...hat.com, gustavoars@...nel.org, keescook@...omium.org,
stefan.wahren@...e.com, gascoar@...il.com, ojaswin98@...il.com,
len.baker@....com, jakobkoschel@...il.com,
linux-staging@...ts.linux.dev,
linux-rpi-kernel@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, jsavitz@...hat.com
Subject: Re: [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
Powered by blists - more mailing lists