[PATCH] firmware: arm_scmi: optee: Check return value of tee_shm_get_va()

Dan Carpenter dan.carpenter at linaro.org
Thu Mar 5 01:19:38 PST 2026


On Thu, Mar 05, 2026 at 03:15:33PM +0800, Chen Ni wrote:
> The function tee_shm_get_va() can return an error pointer if the shared
> memory is not properly mapped or if the offset is invalid.

The memory is properly mapped though.  We just allocated it on the
previous line.  The offset is zero and the size is
SCMI_SHMEM_MAX_PAYLOAD_SIZE so that's fine too.

There is no need for an IS_ERR() check.

regards,
dan carpenter




More information about the linux-arm-kernel mailing list