Commit 7c71d489 authored by Dave Stevenson's avatar Dave Stevenson Committed by Greg Kroah-Hartman

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: default avatarDave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: default avatarJacopo Mondi <jacopo@jmondi.org>
Signed-off-by: default avatarNicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-7-nsaenzjulienne@suse.deSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 20e006b8
......@@ -1270,7 +1270,8 @@ static int port_parameter_get(struct vchiq_mmal_instance *instance,
goto release_msg;
}
ret = -rmsg->u.port_parameter_get_reply.status;
ret = rmsg->u.port_parameter_get_reply.status;
/* port_parameter_get_reply.size includes the header,
* whilst *value_size doesn't.
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment