]> git.baikalelectronics.ru Git - kernel.git/commit
tee: amdtee: skip tee_device_unregister if tee_device_alloc fails
authorRijo Thomas <Rijo-john.Thomas@amd.com>
Thu, 9 Jan 2020 12:53:20 +0000 (18:23 +0530)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 16 Jan 2020 07:18:13 +0000 (15:18 +0800)
commitfe78c9c471aab90d077ed78b1460ae48648432d6
tree5db3f8efd6051b57b7cd534d3dc6b241c0e8b131
parent117c110fff14851bf0b8ed29e3a8b46cb3de31a5
tee: amdtee: skip tee_device_unregister if tee_device_alloc fails

Currently, if tee_device_alloc() fails, then tee_device_unregister()
is a no-op. Therefore, skip the function call to tee_device_unregister() by
introducing a new goto label 'err_free_pool'.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rijo Thomas <Rijo-john.Thomas@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/tee/amdtee/core.c