Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: mmal-vchiq: If the VPU returns an error, don't negate it

There is an enum for the errors that the VPU can return.
port_parameter_get was negating that value, but also using -EINVAL
from the Linux error codes.
Pass the VPU error code as positive values. Should the function
need to pass a Linux failure, then return that as negative.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-7-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Dave Stevenson and committed by
Greg Kroah-Hartman
7c71d489 20e006b8

+2 -1
+2 -1
drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
··· 1270 1270 goto release_msg; 1271 1271 } 1272 1272 1273 - ret = -rmsg->u.port_parameter_get_reply.status; 1273 + ret = rmsg->u.port_parameter_get_reply.status; 1274 + 1274 1275 /* port_parameter_get_reply.size includes the header, 1275 1276 * whilst *value_size doesn't. 1276 1277 */