pxa2xx-flash.c: fix memory leak
PATCH 1/1 pxa2xx-flash.c: fix memory leak
Signed-off-by Daniel Mack <[email protected]>
Cc Nicolas Pitre <[email protected]>
--- drivers/mtd/maps/pxa2xx-flash.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/mtd/maps/pxa2xx-flash.c +2 -0
@@ -70,6 +70,7 @@ static int __init pxa2xx_flash_probe(struct device *dev)if (!info->map.virt) {printk (KERN_WARNING "Failed to ioremap %s\n" , info->map.name); +kfree (info);return -ENOMEM ; } info->map.cached =
@@ -92,6 +93,7 @@ static int __init pxa2xx_flash_probe(struct device *dev)iounmap ((void *)info->map.virt);if (info->map.cached)iounmap (info->map.cached); +kfree (info);return -EIO ; } info->mtd->owner =THIS_MODULE ;
Signature · 1 line
1.6.2
Quoted 3 lines · Daniel Mack
Signed-off-by Daniel Mack <[email protected]>Cc Nicolas Pitre <[email protected]>
Acked-by Nicolas Pitre <[email protected]>
Quoted 27 lines
--- drivers/mtd/maps/pxa2xx-flash.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)drivers/mtd/maps/pxa2xx-flash.c +2
-0@@ -70,6 +70,7 @@ static int __init pxa2xx_flash_probe(struct device *dev)if (!info->map.virt) {printk (KERN_WARNING "Failed to ioremap %s\n" , info->map.name); +kfree (info);return -ENOMEM ; } info->map.cached =@@ -92,6 +93,7 @@ static int __init pxa2xx_flash_probe(struct device *dev)iounmap ((void *)info->map.virt);if (info->map.cached)iounmap (info->map.cached); +kfree (info);return -EIO ; } info->mtd->owner =THIS_MODULE ;Signature · 1 line
1.6.2
Quoted 4 lines · Nicolas Pitre
Quoted 2 lines
Signed-off-by Daniel Mack <[email protected]>Cc Nicolas Pitre <[email protected]>Acked-by Nicolas Pitre <[email protected]>
Thanks - any idea which channel to choose to make it go mainline?
Daniel
Quoted 7 lines · Daniel Mack
Quoted 4 lines · Nicolas Pitre
Quoted 2 lines
Signed-off-by Daniel Mack <[email protected]>Cc Nicolas Pitre <[email protected]>Acked-by Nicolas Pitre <[email protected]>Thanks - any idea which channel to choose to make it go mainline?
The MTD tree.
Nicolas