tee: fix possible error pointer ctx dereferencing
authorSumit Garg <sumit.garg@linaro.org>
Wed, 20 Feb 2019 06:02:27 +0000 (11:32 +0530)
committerArnd Bergmann <arnd@arndb.de>
Wed, 20 Feb 2019 16:54:34 +0000 (17:54 +0100)
commitbb342f016862a0d5b013c2a9dce0f91412b0be77
tree2f0085afdf285d3fd7bd13d02cf832e50d51dfc6
parent56410c0cb43e26a94af094aceab45a5ea38a1a38
tee: fix possible error pointer ctx dereferencing

Add check for valid ctx pointer and then only dereference ctx to
configure supp_nowait flag.

Fixes: 42bf4152d8a7 ("tee: add supp_nowait flag in tee_context struct")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
drivers/tee/tee_core.c