Browse Source

crypto: caam - Provide correct value to iounmap() in controller driver

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>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Victoria Milhoan 10 năm trước cách đây
mục cha
commit
f4ec6aa5b0
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      drivers/crypto/caam/ctrl.c

+ 2 - 2
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);
 
 	return ret;
 }
@@ -496,7 +496,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;
 	}