0f5fc503c9d75e0c0e287f1c35a748e303d33d33
[openwrt/staging/blocktrron.git] /
1 From 524ea8027660c207f4b8cf48068a38a429d29cef 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/782] 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 */