[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1431976122-4228-3-git-send-email-vladimir_zapolskiy@mentor.com>
Date: Mon, 18 May 2015 22:08:35 +0300
From: Vladimir Zapolskiy <vladimir_zapolskiy@...tor.com>
To: Philipp Zabel <p.zabel@...gutronix.de>,
Heiko Stübner <heiko@...ech.de>,
Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC: <linux-kernel@...r.kernel.org>
Subject: [PATCH v3 2/9] misc: sram: fix device node reference leak on error
A pointer device node reference should be decremented on manual exit
from for_each_available_child_of_node() loop.
Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@...tor.com>
---
drivers/misc/sram.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c
index b44a423..999684a 100644
--- a/drivers/misc/sram.c
+++ b/drivers/misc/sram.c
@@ -121,6 +121,7 @@ static int sram_probe(struct platform_device *pdev)
dev_err(&pdev->dev,
"could not get address for node %s\n",
child->full_name);
+ of_node_put(child);
goto err_chunks;
}
@@ -129,6 +130,7 @@ static int sram_probe(struct platform_device *pdev)
"reserved block %s outside the sram area\n",
child->full_name);
ret = -EINVAL;
+ of_node_put(child);
goto err_chunks;
}
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists