926cbde2a1f36ebd4434650a43f386fdceb24224
[openwrt/staging/jow.git] /
1 From 778f855d699bd67e1eb177c7a0bcc30af550ce6a Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.org>
3 Date: Wed, 13 Feb 2019 12:51:03 +0000
4 Subject: [PATCH 357/725] staging: mmal-vchiq: If the VPU returns an error,
5 don't negate it
6
7 There is an enum for the errors that the VPU can return.
8 port_parameter_get was negating that value, but also using -EINVAL
9 from the Linux error codes.
10 Pass the VPU error code as positive values. Should the function
11 need to pass a Linux failure, then return that as negative.
12
13 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
14 ---
15 drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 3 ++-
16 1 file changed, 2 insertions(+), 1 deletion(-)
17
18 --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
19 +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
20 @@ -1401,7 +1401,8 @@ static int port_parameter_get(struct vch
21 goto release_msg;
22 }
23
24 - ret = -rmsg->u.port_parameter_get_reply.status;
25 + ret = rmsg->u.port_parameter_get_reply.status;
26 +
27 /* port_parameter_get_reply.size includes the header,
28 * whilst *value_size doesn't.
29 */