Skip to content

Commit

Permalink
mtd: sh_flctl: Add missing iounmap()
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
Bastian Hecht authored and David Woodhouse committed Jul 6, 2012
1 parent 271b874 commit cb54751
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/mtd/nand/sh_flctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,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;
Expand All @@ -929,6 +930,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;
Expand Down

0 comments on commit cb54751

Please sign in to comment.