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: http://review.tizen.org/git/?a=commitdiff_plain;h=e43c658c5a97570f4c5be8e94eb2ad30d4033123;p=platform%2Fkernel%2Flinux-exynos.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 d5bb10f..90d6e08 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);