04157a816ee2170dda4589529fecfd1c014261c3
[openwrt/staging/luka.git] /
1 From 78c34cf60b9ae8bf8aa797c72d2f1abdc0a0bb9d 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 354/806] 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 */