crypto: cesa: clear cesa_dev on _remove
Subsystems (2)
PATCH 1/1 crypto: cesa: clear cesa_dev on _remove
This is already done on probe failure.
cesa_dev should be set to NULL as the driver checks that it is not and errors saying that only one device is authorized.
Signed-off-by Rosen Penev <[email protected]>
--- drivers/crypto/marvell/cesa/cesa.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/crypto/marvell/cesa/cesa.c +5 -5
@@ -527,13 +527,11 @@ static int mv_cesa_probe(struct platform_device *pdev)INIT_LIST_HEAD (&engine->complete_queue); } - cesa_dev = cesa; - ret =mv_cesa_add_algs (cesa); -if (ret) { - cesa_dev =NULL ; +if (ret) goto err_cleanup; - } + + cesa_dev = cesa;dev_info (dev,"CESA device successfully registered\n" );
@@ -551,6 +549,8 @@ static void mv_cesa_remove(struct platform_device *pdev)struct mv_cesa_dev *cesa =platform_get_drvdata (pdev);int i; + cesa_dev =NULL ; +mv_cesa_remove_algs (cesa);for (i =0 ; i < cesa->caps->nengines; i++)
Signature · 1 line
2.55.0