Patchwork [v2,01/10] mtd: sh_flctl: Add missing iounmap()

login
register
mail settings
Submitter Bastian Hecht
Date April 25, 2012, 2:03 p.m.
Message ID <1335362618-4559-2-git-send-email-hechtb@gmail.com>
Download mbox | patch
Permalink /patch/154933/
State Accepted
Commit cb54751d7a706b4a068b798b97e8a815b99fa835
Headers show

Comments

Bastian Hecht - April 25, 2012, 2:03 p.m.
Add the unmapping for the error case and for the driver removal.

Signed-off-by: Bastian Hecht <hechtb@gmail.com>
---
 drivers/mtd/nand/sh_flctl.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
Laurent Pinchart - April 25, 2012, 2:14 p.m.
Hi Bastian,

Thanks for the patch.

On Wednesday 25 April 2012 16:03:29 Bastian Hecht wrote:
> Add the unmapping for the error case and for the driver removal.
> 
> Signed-off-by: Bastian Hecht <hechtb@gmail.com>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/mtd/nand/sh_flctl.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/mtd/nand/sh_flctl.c b/drivers/mtd/nand/sh_flctl.c
> index 2ee9a1b..ed86a64 100644
> --- a/drivers/mtd/nand/sh_flctl.c
> +++ b/drivers/mtd/nand/sh_flctl.c
> @@ -919,6 +919,7 @@ static int __devinit flctl_probe(struct platform_device
> *pdev)
> 
>  err_chip:
>  	pm_runtime_disable(&pdev->dev);
> +	iounmap(flctl->reg);
>  err_iomap:
>  	kfree(flctl);
>  	return ret;
> @@ -930,6 +931,7 @@ static int __devexit flctl_remove(struct platform_device
> *pdev)
> 
>  	nand_release(&flctl->mtd);
>  	pm_runtime_disable(&pdev->dev);
> +	iounmap(flctl->reg);
>  	kfree(flctl);
> 
>  	return 0;

Patch

diff --git a/drivers/mtd/nand/sh_flctl.c b/drivers/mtd/nand/sh_flctl.c
index 2ee9a1b..ed86a64 100644
--- a/drivers/mtd/nand/sh_flctl.c
+++ b/drivers/mtd/nand/sh_flctl.c
@@ -919,6 +919,7 @@  static int __devinit flctl_probe(struct platform_device *pdev)
 
 err_chip:
 	pm_runtime_disable(&pdev->dev);
+	iounmap(flctl->reg);
 err_iomap:
 	kfree(flctl);
 	return ret;
@@ -930,6 +931,7 @@  static int __devexit flctl_remove(struct platform_device *pdev)
 
 	nand_release(&flctl->mtd);
 	pm_runtime_disable(&pdev->dev);
+	iounmap(flctl->reg);
 	kfree(flctl);
 
 	return 0;