This patch removes redundant execution of the same test suite in cases
where alg and driver variables are the same (e.g. when alg_test is
called from tcrypt_test)
Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
Reviewed-by: Horia Geanta <horia.geanta@freescale.com>
Reviewed-by: Ruchika Gupta <ruchika.gupta@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
        if (i >= 0)
                rc |= alg_test_descs[i].test(alg_test_descs + i, driver,
                                             type, mask);
-       if (j >= 0)
+       if (j >= 0 && j != i)
                rc |= alg_test_descs[j].test(alg_test_descs + j, driver,
                                             type, mask);