1 [PATCH] vpu-io: fix IOSystemInit failure
3 When using a kernel where user/kernel split is 3G/1G, the address
4 returned by IOGetVirtMem() can appear to be a negative int.
6 IOSystemInit() incorrectly checks the return value of IOGetVirtMem().
7 IOGetVirtMem() returns -1 on error (and not MAP_FAILED, nor any other
10 Fix that by correctly checking against -1 (and not MAP_FAILED!)
12 Signed-off-by: Gary Bisson <bisson.gary@gmail.com>
13 [yann.morin.1998@free.fr: expand the commit log]
14 Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
17 1 file changed, 1 insertion(+), 1 deletion(-)
19 diff --git a/vpu/vpu_io.c b/vpu/vpu_io.c
20 index 8cbb571..14759da 100644
23 @@ -265,7 +265,7 @@ int IOSystemInit(void *callback)
27 - if (IOGetVirtMem(&bit_work_addr) <= 0)
28 + if (IOGetVirtMem(&bit_work_addr) == -1)