diff mbox

[RFC,10/11] crypto: caam - Provide correct value to iounmap() in controller driver

Message ID 1434412379-11623-11-git-send-email-vicki.milhoan@freescale.com (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show

Commit Message

Victoria Milhoan June 15, 2015, 11:52 p.m. UTC
Fix a "Trying to vfree() nonexistent vm area" error when unloading the CAAM
controller module by providing the correct pointer value to iounmap().

Signed-off-by: Victoria Milhoan <vicki.milhoan@freescale.com>
---
 drivers/crypto/caam/ctrl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Herbert Xu June 16, 2015, 6:41 a.m. UTC | #1
On Mon, Jun 15, 2015 at 04:52:58PM -0700, Victoria Milhoan wrote:
> Fix a "Trying to vfree() nonexistent vm area" error when unloading the CAAM
> controller module by providing the correct pointer value to iounmap().
> 
> Signed-off-by: Victoria Milhoan <vicki.milhoan@freescale.com>

Applied.
diff mbox

Patch

diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c
index 3226eb8..8a4b239 100644
--- a/drivers/crypto/caam/ctrl.c
+++ b/drivers/crypto/caam/ctrl.c
@@ -301,7 +301,7 @@  static int caam_remove(struct platform_device *pdev)
 #endif
 
 	/* Unmap controller region */
-	iounmap(&ctrl);
+	iounmap(ctrl);
 
 #ifdef CONFIG_ARM
 	/* shut clocks off before finalizing shutdown */
@@ -577,7 +577,7 @@  static int caam_probe(struct platform_device *pdev)
 					sizeof(struct platform_device *) * rspec,
 					GFP_KERNEL);
 	if (ctrlpriv->jrpdev == NULL) {
-		iounmap(&ctrl);
+		iounmap(ctrl);
 		return -ENOMEM;
 	}