]> Pileus Git - ~andy/linux/blobdiff - crypto/rng.c
Merge branches 'x86-asm-for-linus', 'x86-cleanups-for-linus', 'x86-cpu-for-linus...
[~andy/linux] / crypto / rng.c
index 64f864fa8043740f50bc186e58a2ee37d8a1499a..f3b7894dec00ee5207642f7ff95cbf8ef6aaeb2f 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: