linux/drivers/crypto/amcc
Julia Lawall 8c2b43d2d8 crypto: crypto4xx - add missing of_node_put after of_device_is_available
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: 5343e674f3 ("crypto4xx: integrate ppc4xx-rng into crypto4xx")
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2019-02-28 14:37:35 +08:00
..
Makefile crypto: crypto4xx - move and refactor dynamic_contents helpers 2017-09-22 17:43:18 +08:00
crypto4xx_alg.c crypto: drop mask=CRYPTO_ALG_ASYNC from 'cipher' tfm allocations 2018-11-20 14:26:55 +08:00
crypto4xx_core.c crypto: crypto4xx - add prng crypto support 2019-01-11 14:16:56 +08:00
crypto4xx_core.h crypto: crypto4xx - add prng crypto support 2019-01-11 14:16:56 +08:00
crypto4xx_reg_def.h crypto: crypto4xx - add prng crypto support 2019-01-11 14:16:56 +08:00
crypto4xx_sa.h crypto: crypto4xx - prepare for AEAD support 2017-10-12 22:55:19 +08:00
crypto4xx_trng.c crypto: crypto4xx - add missing of_node_put after of_device_is_available 2019-02-28 14:37:35 +08:00
crypto4xx_trng.h crypto: crypto4xx - Fix wrong ppc4xx_trng_probe()/ppc4xx_trng_remove() arguments 2019-02-01 14:42:04 +08:00