Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ba6a98fe authored by David Hildenbrand's avatar David Hildenbrand Committed by Heiko Carstens
Browse files

s390/crypto: prng: 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: default avatarCornelia Huck <cohuck@redhat.com>
Reviewed-by: default avatarHarald Freudenberger <freude@linux.ibm.com>
Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
parent 1c0908fc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -824,7 +824,7 @@ static int __init prng_init(void)

	/* check if the CPU has a PRNG */
	if (!cpacf_query_func(CPACF_KMC, CPACF_KMC_PRNG))
		return -EOPNOTSUPP;
		return -ENODEV;

	/* check if TRNG subfunction is available */
	if (cpacf_query_func(CPACF_PRNO, CPACF_PRNO_TRNG))
@@ -837,7 +837,7 @@ static int __init prng_init(void)
			if (prng_mode == PRNG_MODE_SHA512) {
				pr_err("The prng module cannot "
				       "start in SHA-512 mode\n");
				return -EOPNOTSUPP;
				return -ENODEV;
			}
			prng_mode = PRNG_MODE_TDES;
		} else