Commit b79967a2 authored by Marcelo Diop-Gonzalez's avatar Marcelo Diop-Gonzalez Committed by Greg Kroah-Hartman
Browse files

staging: vchiq: Have vchiu_queue_init() return 0 on success.



It could be confusing to return 1 on success and 0 on error
given the style elswhere.

Signed-off-by: default avatarMarcelo Diop-Gonzalez <marcgonzalez@google.com>
Link: https://lore.kernel.org/r/20191105222756.25369-1-marcgonzalez@google.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4df0991b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -573,7 +573,7 @@ static struct shim_service *service_alloc(struct vchiq_instance *instance,
	(void)instance;

	if (service) {
		if (vchiu_queue_init(&service->queue, 64)) {
		if (!vchiu_queue_init(&service->queue, 64)) {
			service->callback = setup->callback;
			service->callback_param = setup->callback_param;
		} else {
+2 −2
Original line number Diff line number Diff line
@@ -24,9 +24,9 @@ int vchiu_queue_init(struct vchiu_queue *queue, int size)
				 GFP_KERNEL);
	if (!queue->storage) {
		vchiu_queue_delete(queue);
		return 0;
		return -ENOMEM;
	}
	return 1;
	return 0;
}

void vchiu_queue_delete(struct vchiu_queue *queue)