anolis-cloud-kernel/drivers/tee
Julia Lawall 4f4ab0b49c tee: optee: add missing of_node_put after of_device_is_available
commit c7c0d8df0b upstream.

Add an of_node_put when a tested device node is not available.

The semantic patch that fixes this problem is as follows
(http://coccinelle.lip6.fr):

// <smpl>
@@
identifier f;
local idexpression e;
expression x;
@@

e = f(...);
... when != of_node_put(e)
    when != x = e
    when != e = x
    when any
if (<+...of_device_is_available(e)...+>) {
  ... when != of_node_put(e)
(
  return e;
|
+ of_node_put(e);
  return ...;
)
}
// </smpl>

Fixes: db878f76b9 ("tee: optee: take DT status property into account")
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Cc: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-24 08:19:08 +01:00
..
optee tee: optee: add missing of_node_put after of_device_is_available 2019-11-24 08:19:08 +01:00
Kconfig
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tee_core.c tee: check shm references are consistent in offset/size 2018-05-07 11:51:03 +02:00
tee_private.h tee: use reference counting for tee_context 2017-12-15 13:36:18 +01:00
tee_shm.c drm-misc-next for 4.19: 2018-06-22 12:58:08 +10:00
tee_shm_pool.c tee: flexible shared memory pool creation 2017-12-15 12:37:29 +01:00