linux/drivers/tee/optee
Jens Wiklander 03212e347f tee: optee: fix device enumeration error handling
Prior to this patch in optee_probe() when optee_enumerate_devices() was
called the struct optee was fully initialized. If
optee_enumerate_devices() returns an error optee_probe() is supposed to
clean up and free the struct optee completely, but will at this late
stage need to call optee_remove() instead. This isn't done and thus
freeing the struct optee prematurely.

With this patch the call to optee_enumerate_devices() is done after
optee_probe() has returned successfully and in case
optee_enumerate_devices() fails everything is cleaned up with a call to
optee_remove().

Fixes: c3fa24af92 ("tee: optee: add TEE bus device enumeration support")
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
2019-11-15 11:31:24 +01:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile tee: optee: add TEE bus device enumeration support 2019-02-01 15:12:46 +01:00
call.c tee: optee: Fix dynamic shm pool allocations 2019-11-15 11:31:11 +01:00
core.c tee: optee: fix device enumeration error handling 2019-11-15 11:31:24 +01:00
device.c tee: optee: Fix unsigned comparison with less than zero 2019-02-20 17:57:47 +01:00
optee_msg.h tee: optee: update optee_msg.h and optee_smc.h to dual license 2019-02-28 13:49:29 +01:00
optee_private.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
optee_smc.h tee: optee: update optee_msg.h and optee_smc.h to dual license 2019-02-28 13:49:29 +01:00
rpc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
shm_pool.c tee: optee: Fix dynamic shm pool allocations 2019-11-15 11:31:11 +01:00
shm_pool.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
supp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00