diff options
author | Marcelo Diop-Gonzalez <marcgonzalez@google.com> | 2019-11-05 17:27:56 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-11-07 16:26:31 +0100 |
commit | b79967a27f347d39a6e0b85b49bd11963cacf5c1 (patch) | |
tree | 4fbdad2c7ca36ddd2bef1be8bf1cd4a34e251555 /drivers/staging/vc04_services/interface | |
parent | 4df0991b0c92c74c5e81bf55fd156ce92d812d01 (diff) |
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: Marcelo Diop-Gonzalez <marcgonzalez@google.com>
Link: https://lore.kernel.org/r/20191105222756.25369-1-marcgonzalez@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vc04_services/interface')
-rw-r--r-- | drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c | 2 | ||||
-rw-r--r-- | drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c index 3055e94a53da..0ce3b08b3441 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c @@ -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 { diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c index 5e6d3035dc05..644844d88fed 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c @@ -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) |