X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=sidebyside;f=lustre%2Fobdclass%2Fcapa.c;fp=lustre%2Fobdclass%2Fcapa.c;h=29c40c17bbffcd016f96d5c686440806995c3ac5;hb=a32a2faaa95e4e3379511dd2e8d5493496437867;hp=5f5bc1bfd6adfe47a9d737ddf3a071aff0362fb5;hpb=8ce48257490f20ec7f11929a42ab3891139a9d8c;p=fs%2Flustre-release.git diff --git a/lustre/obdclass/capa.c b/lustre/obdclass/capa.c index 5f5bc1b..29c40c1 100644 --- a/lustre/obdclass/capa.c +++ b/lustre/obdclass/capa.c @@ -258,10 +258,10 @@ int capa_hmac(__u8 *hmac, struct lustre_capa *capa, __u8 *key) alg = &capa_hmac_algs[capa_alg(capa)]; tfm = crypto_alloc_hash(alg->ha_name, 0, 0); - if (!tfm) { + if (IS_ERR(tfm)) { CERROR("crypto_alloc_tfm failed, check whether your kernel" "has crypto support!\n"); - return -ENOMEM; + return PTR_ERR(tfm); } keylen = alg->ha_keylen;