Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tee: allow a driver to allocate a tee_device without a pool

A TEE driver doesn't always need to provide a pool if it doesn't
support memory sharing ioctls and can allocate memory for TEE
messages in another way. Although this is mentioned in the
documentation for tee_device_alloc(), it is not handled correctly.

Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Signed-off-by: Amirreza Zarrabi <amirreza.zarrabi@oss.qualcomm.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

authored by

Amirreza Zarrabi and committed by
Jens Wiklander
6dbcd5a9 36629d52

+1 -1
+1 -1
drivers/tee/tee_core.c
··· 963 963 964 964 if (!teedesc || !teedesc->name || !teedesc->ops || 965 965 !teedesc->ops->get_version || !teedesc->ops->open || 966 - !teedesc->ops->release || !pool) 966 + !teedesc->ops->release) 967 967 return ERR_PTR(-EINVAL); 968 968 969 969 teedev = kzalloc(sizeof(*teedev), GFP_KERNEL);