summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJens Wiklander <jens.wiklander@linaro.org>2019-11-06 16:48:28 +0100
committerJens Wiklander <jens.wiklander@linaro.org>2019-11-15 11:31:24 +0100
commit03212e347f9443e524d6383c6806ac08295c1fb0 (patch)
tree6aba9cb31741b8defcdfad5eba1a206b16b031ad /include
parenta249dd200d03791cab23e47571f3e13d9c72af6c (diff)
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: c3fa24af9244 ("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>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions