staging: vchiq: Have vchiq_dump_* functions return an error code
authorMarcelo Diop-Gonzalez <marcgonzalez@google.com>
Wed, 20 Nov 2019 20:21:02 +0000 (15:21 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 Nov 2019 10:40:31 +0000 (11:40 +0100)
commit0f6f8749872e7be6c083dc845bf4d45a7018b79c
tree28cbd024ac053389c9d674cb58de1e28ecfcd9a9
parent0046b33ce553f48551ea6e4879562d423ed3f1a0
staging: vchiq: Have vchiq_dump_* functions return an error code

These functions currently modify the struct dump_context passed
to them, and set context->actual to -EFAULT in case of error.
The issue is that this is never returned to the user (except
accidentally when things align so that that happens). So, have
these functions return 0 on success and the appropriate error
code otherwise, and return nonzero errors to the user.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Marcelo Diop-Gonzalez <marcgonzalez@google.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20191120202102.249121-5-marcgonzalez@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h