crypto: caam - clean-up in caam_init_rng()
authorHoria Geantă <horia.geanta@nxp.com>
Mon, 10 Jul 2017 05:40:38 +0000 (08:40 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 18 Jul 2017 10:16:07 +0000 (18:16 +0800)
Clean up the code, as indicated by Coccinelle.

Cc: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/caamrng.c

index 41398da3edf44fc4468a357cadb67285270d5934..fde07d4ff0190efcc229fd0a561681fcd5c07b28 100644 (file)
@@ -285,11 +285,7 @@ static int caam_init_rng(struct caam_rng_ctx *ctx, struct device *jrdev)
        if (err)
                return err;
 
-       err = caam_init_buf(ctx, 1);
-       if (err)
-               return err;
-
-       return 0;
+       return caam_init_buf(ctx, 1);
 }
 
 static struct hwrng caam_rng = {