[PATCH 1/2] crypto: bfin_crc: ignore duplicated registration of the same algorithm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Sonic Zhang <sonic.zhang@xxxxxxxxxx>

in case of multiple crc devices are probed.

Signed-off-by: Sonic Zhang <sonic.zhang@xxxxxxxxxx>
---
 drivers/crypto/bfin_crc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/bfin_crc.c b/drivers/crypto/bfin_crc.c
index cea3e8c..5f5f427 100644
--- a/drivers/crypto/bfin_crc.c
+++ b/drivers/crypto/bfin_crc.c
@@ -672,7 +672,7 @@ static int bfin_crypto_crc_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, crc);
 
 	ret = crypto_register_ahash(&algs);
-	if (ret) {
+	if (ret && ret != -EEXIST) {
 		spin_lock(&crc_list.lock);
 		list_del(&crc->list);
 		spin_unlock(&crc_list.lock);
-- 
1.8.2.3


--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux