]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
tee: allow a driver to allocate a tee_device without a pool
authorAmirreza Zarrabi <amirreza.zarrabi@oss.qualcomm.com>
Fri, 12 Sep 2025 04:07:42 +0000 (21:07 -0700)
committerJens Wiklander <jens.wiklander@linaro.org>
Mon, 15 Sep 2025 15:34:06 +0000 (17:34 +0200)
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>
drivers/tee/tee_core.c

index cea4da3ea46f8e310872854baf40e61d3f6674d7..68f55689883601249a061c9a5e2378d96ec7b85d 100644 (file)
@@ -963,7 +963,7 @@ struct tee_device *tee_device_alloc(const struct tee_desc *teedesc,
 
        if (!teedesc || !teedesc->name || !teedesc->ops ||
            !teedesc->ops->get_version || !teedesc->ops->open ||
-           !teedesc->ops->release || !pool)
+           !teedesc->ops->release)
                return ERR_PTR(-EINVAL);
 
        teedev = kzalloc(sizeof(*teedev), GFP_KERNEL);