diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 84f9640..0abd85f 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c @@ -2107,7 +2122,8 @@ int alg_test(const char *driver, const char *alg, u32 type, u32 mask) if (i < 0) goto notest; - return alg_test_cipher(alg_test_descs + i, driver, type, mask); + rc = alg_test_cipher(alg_test_descs + i, driver, type, mask); + goto test_done; } i = alg_find_test(alg); @@ -2116,14 +2132,13 @@ int alg_test(const char *driver, const char *alg, u32 type, u32 mask) rc = alg_test_descs[i].test(alg_test_descs + i, driver, type, mask); + goto test_done; +notest: + printk(KERN_INFO "alg: No test for %s (%s)\n", alg, driver); +test_done: if (fips_enabled && rc) panic("%s: %s alg self test failed in fips mode!\n", driver, alg); - return rc; - -notest: - printk(KERN_INFO "alg: No test for %s (%s)\n", alg, driver); - return 0; } EXPORT_SYMBOL_GPL(alg_test);