f79e499930bd2e58135ff0f03410cc3a3265ff00
[openwrt/staging/noltari.git] /
1 From 351eab98f47fae8172a91cb8d65237dd1fd41a11 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 360/703] 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 @@ -1400,7 +1400,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 */