gpu: nvgpu: post events on all channels of TSG.
[linux-3.10.git] / crypto / pcompress.c
index 2e458e5..7140fe7 100644 (file)
@@ -53,11 +53,10 @@ static int crypto_pcomp_report(struct sk_buff *skb, struct crypto_alg *alg)
 {
        struct crypto_report_comp rpcomp;
 
-       snprintf(rpcomp.type, CRYPTO_MAX_ALG_NAME, "%s", "pcomp");
-
-       NLA_PUT(skb, CRYPTOCFGA_REPORT_COMPRESS,
-               sizeof(struct crypto_report_comp), &rpcomp);
-
+       strncpy(rpcomp.type, "pcomp", sizeof(rpcomp.type));
+       if (nla_put(skb, CRYPTOCFGA_REPORT_COMPRESS,
+                   sizeof(struct crypto_report_comp), &rpcomp))
+               goto nla_put_failure;
        return 0;
 
 nla_put_failure: