crypto: sa2ul - Remove child devices in remove
authorSuman Anna <s-anna@ti.com>
Fri, 14 May 2021 16:12:46 +0000 (11:12 -0500)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sun, 23 May 2021 00:52:40 +0000 (08:52 +0800)
The sa_ul_probe creates child devices using of_platform_populate(),
but these are not cleaned up in driver remove. Clean these up
by removing the child devices using of_platform_depopulate().

Signed-off-by: Suman Anna <s-anna@ti.com>
Reviewed-by: Tero Kristo <kristo@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/sa2ul.c

index 216702fef94515736ff9022606a9b0754d997bbc..51bb69bc573c31dd9c30aad1aaddd3f866ccd90d 100644 (file)
@@ -2467,6 +2467,8 @@ static int sa_ul_remove(struct platform_device *pdev)
 {
        struct sa_crypto_data *dev_data = platform_get_drvdata(pdev);
 
+       of_platform_depopulate(&pdev->dev);
+
        sa_unregister_algos(&pdev->dev);
 
        dma_release_channel(dev_data->dma_rx2);