298cd8eaa2
Autogenerated from rename-patch.py (http://patchwork.ozlabs.org/patch/403345) Signed-off-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
33 lines
932 B
Diff
33 lines
932 B
Diff
[PATCH] vpu-io: fix IOSystemInit failure
|
|
|
|
When using a kernel where user/kernel split is 3G/1G, the address
|
|
returned by IOGetVirtMem() can appear to be a negative int.
|
|
|
|
IOSystemInit() incorrectly checks the return value of IOGetVirtMem().
|
|
IOGetVirtMem() returns -1 on error (and not MAP_FAILED, nor any other
|
|
negative value.)
|
|
|
|
Fix that by correctly checking against -1 (and not MAP_FAILED!)
|
|
|
|
Signed-off-by: Gary Bisson <bisson.gary@gmail.com>
|
|
[yann.morin.1998@free.fr: expand the commit log]
|
|
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
|
|
---
|
|
vpu/vpu_io.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/vpu/vpu_io.c b/vpu/vpu_io.c
|
|
index 8cbb571..14759da 100644
|
|
--- a/vpu/vpu_io.c
|
|
+++ b/vpu/vpu_io.c
|
|
@@ -265,7 +265,7 @@ int IOSystemInit(void *callback)
|
|
goto err;
|
|
}
|
|
|
|
- if (IOGetVirtMem(&bit_work_addr) <= 0)
|
|
+ if (IOGetVirtMem(&bit_work_addr) == -1)
|
|
goto err;
|
|
#endif
|
|
UnlockVpu(vpu_semap);
|
|
|