Skip to content

Commit 45488c4

Browse files
davidhildenbrandheicarst
authored andcommitted
s390/crypto: sha: Use -ENODEV instead of -EOPNOTSUPP
Let's use the error value that is typically used if HW support is not available when trying to load a module - this is also what systemd's systemd-modules-load.service expects. Reviewed-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Harald Freudenberger <freude@linux.ibm.com> Signed-off-by: David Hildenbrand <david@redhat.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
1 parent ba6a98f commit 45488c4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

arch/s390/crypto/sha1_s390.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ static struct shash_alg alg = {
8686
static int __init sha1_s390_init(void)
8787
{
8888
if (!cpacf_query_func(CPACF_KIMD, CPACF_KIMD_SHA_1))
89-
return -EOPNOTSUPP;
89+
return -ENODEV;
9090
return crypto_register_shash(&alg);
9191
}
9292

arch/s390/crypto/sha256_s390.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ static int __init sha256_s390_init(void)
117117
int ret;
118118

119119
if (!cpacf_query_func(CPACF_KIMD, CPACF_KIMD_SHA_256))
120-
return -EOPNOTSUPP;
120+
return -ENODEV;
121121
ret = crypto_register_shash(&sha256_alg);
122122
if (ret < 0)
123123
goto out;

arch/s390/crypto/sha512_s390.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ static int __init init(void)
127127
int ret;
128128

129129
if (!cpacf_query_func(CPACF_KIMD, CPACF_KIMD_SHA_512))
130-
return -EOPNOTSUPP;
130+
return -ENODEV;
131131
if ((ret = crypto_register_shash(&sha512_alg)) < 0)
132132
goto out;
133133
if ((ret = crypto_register_shash(&sha384_alg)) < 0)

0 commit comments

Comments
 (0)