aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/crypto_user.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/crypto_user.c')
-rw-r--r--crypto/crypto_user.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/crypto/crypto_user.c b/crypto/crypto_user.c
index f1ea0a064135..5a37eadb4e56 100644
--- a/crypto/crypto_user.c
+++ b/crypto/crypto_user.c
@@ -81,9 +81,9 @@ static int crypto_report_cipher(struct sk_buff *skb, struct crypto_alg *alg)
81 rcipher.min_keysize = alg->cra_cipher.cia_min_keysize; 81 rcipher.min_keysize = alg->cra_cipher.cia_min_keysize;
82 rcipher.max_keysize = alg->cra_cipher.cia_max_keysize; 82 rcipher.max_keysize = alg->cra_cipher.cia_max_keysize;
83 83
84 NLA_PUT(skb, CRYPTOCFGA_REPORT_CIPHER, 84 if (nla_put(skb, CRYPTOCFGA_REPORT_CIPHER,
85 sizeof(struct crypto_report_cipher), &rcipher); 85 sizeof(struct crypto_report_cipher), &rcipher))
86 86 goto nla_put_failure;
87 return 0; 87 return 0;
88 88
89nla_put_failure: 89nla_put_failure:
@@ -96,9 +96,9 @@ static int crypto_report_comp(struct sk_buff *skb, struct crypto_alg *alg)
96 96
97 snprintf(rcomp.type, CRYPTO_MAX_ALG_NAME, "%s", "compression"); 97 snprintf(rcomp.type, CRYPTO_MAX_ALG_NAME, "%s", "compression");
98 98
99 NLA_PUT(skb, CRYPTOCFGA_REPORT_COMPRESS, 99 if (nla_put(skb, CRYPTOCFGA_REPORT_COMPRESS,
100 sizeof(struct crypto_report_comp), &rcomp); 100 sizeof(struct crypto_report_comp), &rcomp))
101 101 goto nla_put_failure;
102 return 0; 102 return 0;
103 103
104nla_put_failure: 104nla_put_failure:
@@ -117,16 +117,16 @@ static int crypto_report_one(struct crypto_alg *alg,
117 ualg->cru_flags = alg->cra_flags; 117 ualg->cru_flags = alg->cra_flags;
118 ualg->cru_refcnt = atomic_read(&alg->cra_refcnt); 118 ualg->cru_refcnt = atomic_read(&alg->cra_refcnt);
119 119
120 NLA_PUT_U32(skb, CRYPTOCFGA_PRIORITY_VAL, alg->cra_priority); 120 if (nla_put_u32(skb, CRYPTOCFGA_PRIORITY_VAL, alg->cra_priority))
121 121 goto nla_put_failure;
122 if (alg->cra_flags & CRYPTO_ALG_LARVAL) { 122 if (alg->cra_flags & CRYPTO_ALG_LARVAL) {
123 struct crypto_report_larval rl; 123 struct crypto_report_larval rl;
124 124
125 snprintf(rl.type, CRYPTO_MAX_ALG_NAME, "%s", "larval"); 125 snprintf(rl.type, CRYPTO_MAX_ALG_NAME, "%s", "larval");
126 126
127 NLA_PUT(skb, CRYPTOCFGA_REPORT_LARVAL, 127 if (nla_put(skb, CRYPTOCFGA_REPORT_LARVAL,
128 sizeof(struct crypto_report_larval), &rl); 128 sizeof(struct crypto_report_larval), &rl))
129 129 goto nla_put_failure;
130 goto out; 130 goto out;
131 } 131 }
132 132