]> git.itanic.dy.fi Git - linux-stable/commit
tee: optee: Fix missing devices unregister during optee_remove
authorSumit Garg <sumit.garg@linaro.org>
Tue, 12 Oct 2021 07:31:16 +0000 (13:01 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Oct 2021 09:57:53 +0000 (11:57 +0200)
commita009758b28f3e6d02664f1140712b7ba098dec15
tree7e980735cd846c6631bae9dd2d6a0e00e60cf719
parent362d067a231d4124045234aa7f35d5acb484ecb4
tee: optee: Fix missing devices unregister during optee_remove

commit 7f565d0ead264329749c0da488de9c8dfa2f18ce upstream.

When OP-TEE driver is built as a module, OP-TEE client devices
registered on TEE bus during probe should be unregistered during
optee_remove. So implement optee_unregister_devices() accordingly.

Fixes: c3fa24af9244 ("tee: optee: add TEE bus device enumeration support")
Reported-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tee/optee/core.c
drivers/tee/optee/device.c
drivers/tee/optee/optee_private.h