From: Andreas Dilger Date: Sat, 26 Mar 2016 19:40:52 +0000 (-0400) Subject: staging: lustre: libcfs: return proper error code for cfs_crypto_hash_speed() X-Git-Tag: v4.7-rc1~90^2~528 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e43c658c5a97570f4c5be8e94eb2ad30d4033123;p=karo-tx-linux.git staging: lustre: libcfs: return proper error code for cfs_crypto_hash_speed() Return a real error code, -ENOENT, instead of a -1. Signed-off-by: Andreas Dilger Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5053 Reviewed-on: http://review.whamcloud.com/9990 Reviewed-by: Bob Glossman Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-crypto.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-crypto.c index d5bb10fec511..90d6e082aead 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-crypto.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-crypto.c @@ -357,7 +357,7 @@ int cfs_crypto_hash_speed(enum cfs_crypto_hash_alg hash_alg) { if (hash_alg < CFS_HASH_ALG_MAX) return cfs_crypto_hash_speeds[hash_alg]; - return -1; + return -ENOENT; } EXPORT_SYMBOL(cfs_crypto_hash_speed);