Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
[platform/adaptation/renesas_rcar/renesas_kernel.git] / crypto / rng.c
index 64f864f..f3b7894 100644 (file)
@@ -69,9 +69,9 @@ static int crypto_rng_report(struct sk_buff *skb, struct crypto_alg *alg)
 
        rrng.seedsize = alg->cra_rng.seedsize;
 
-       NLA_PUT(skb, CRYPTOCFGA_REPORT_RNG,
-               sizeof(struct crypto_report_rng), &rrng);
-
+       if (nla_put(skb, CRYPTOCFGA_REPORT_RNG,
+                   sizeof(struct crypto_report_rng), &rrng))
+               goto nla_put_failure;
        return 0;
 
 nla_put_failure: