]> code.ossystems Code Review - meta-freescale.git/commit
imx-vpu: fix checks of IOGetVirtMem() return value
authorEric Nelson <eric.nelson@boundarydevices.com>
Sat, 21 Jun 2014 17:52:48 +0000 (10:52 -0700)
committerOtavio Salvador <otavio@ossystems.com.br>
Wed, 25 Jun 2014 16:29:04 +0000 (13:29 -0300)
commit3f5c97a4c524a2fb9a4510e6e15f500a20871d67
tree28533105fda828ce4b338c90d7b74741a5f52233
parent605c8d7d843c96166cd4608316940f8da536a392
imx-vpu: fix checks of IOGetVirtMem() return value

The IOGetVirtMem() routine returns the address of a memory block
or -1 (MAP_FAILED) to indicate an error.

Many callers of this routine tested the return value for <= 0
to detect failure, and at least with a 3G/1G memory split
configured in the kernel, a negative number (!= -1) is a
valid (successful) return value.

Without this patch, the IOSystemInit() will often detect
failure incorrectly.

Change-Id: I8b20ae5f74608307cbb810168024e8863599dbdb
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
meta-fsl-arm/recipes-bsp/imx-vpu/imx-vpu/0001-IOGetVirtMem-returns-1-MAP_FAILED-on-failure.patch [new file with mode: 0644]
meta-fsl-arm/recipes-bsp/imx-vpu/imx-vpu_3.10.17-1.0.0.bb