Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-4423 obdclass: fix return value check in capa_hmac()
[fs/lustre-release.git]
/
lustre
/
obdclass
/
capa.c
diff --git
a/lustre/obdclass/capa.c
b/lustre/obdclass/capa.c
index
5f5bc1b
..
29c40c1
100644
(file)
--- 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);
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");
CERROR("crypto_alloc_tfm failed, check whether your kernel"
"has crypto support!\n");
- return
-ENOMEM
;
+ return
PTR_ERR(tfm)
;
}
keylen = alg->ha_keylen;
}
keylen = alg->ha_keylen;