All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] add missing of_node_put after calling of_parse_phandle (1st)
@ 2016-07-01  9:41 ` Peter Chen
  0 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-01  9:41 UTC (permalink / raw)
  To: linux-renesas-soc, linux-arm-kernel, linux-kernel, linux-pm,
	linux-samsung-soc
  Cc: Peter Chen

Hi all,

of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using, but there are many codes
do not follow that, this patch set fixes some of them.

Peter Chen (7):
  extcon: add missing of_node_put after calling of_parse_phandle
  arm: mach-shmobile: pm-rmobile: add missing of_node_put after calling
    of_parse_phandle
  arm: mach-u300: regulator: add missing of_node_put after calling
    of_parse_phandle
  bus: arm-cci: add missing of_node_put after calling of_parse_phandle
  bus: vexpress-config: add missing of_node_put after calling
    of_parse_phandle
  devfreq: add missing of_node_put after calling of_parse_phandle
  devfreq: exynos-bus: add missing of_node_put after calling
    of_parse_phandle

 arch/arm/mach-shmobile/pm-rmobile.c |  1 +
 arch/arm/mach-u300/regulator.c      | 12 +++++++++---
 drivers/bus/arm-cci.c               |  5 ++++-
 drivers/bus/vexpress-config.c       |  1 +
 drivers/devfreq/devfreq.c           |  2 ++
 drivers/devfreq/exynos-bus.c        |  9 ++++++---
 drivers/extcon/extcon.c             |  2 ++
 7 files changed, 25 insertions(+), 7 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 0/7] add missing of_node_put after calling of_parse_phandle (1st)
@ 2016-07-01  9:41 ` Peter Chen
  0 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-01  9:41 UTC (permalink / raw)
  To: linux-arm-kernel

Hi all,

of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using, but there are many codes
do not follow that, this patch set fixes some of them.

Peter Chen (7):
  extcon: add missing of_node_put after calling of_parse_phandle
  arm: mach-shmobile: pm-rmobile: add missing of_node_put after calling
    of_parse_phandle
  arm: mach-u300: regulator: add missing of_node_put after calling
    of_parse_phandle
  bus: arm-cci: add missing of_node_put after calling of_parse_phandle
  bus: vexpress-config: add missing of_node_put after calling
    of_parse_phandle
  devfreq: add missing of_node_put after calling of_parse_phandle
  devfreq: exynos-bus: add missing of_node_put after calling
    of_parse_phandle

 arch/arm/mach-shmobile/pm-rmobile.c |  1 +
 arch/arm/mach-u300/regulator.c      | 12 +++++++++---
 drivers/bus/arm-cci.c               |  5 ++++-
 drivers/bus/vexpress-config.c       |  1 +
 drivers/devfreq/devfreq.c           |  2 ++
 drivers/devfreq/exynos-bus.c        |  9 ++++++---
 drivers/extcon/extcon.c             |  2 ++
 7 files changed, 25 insertions(+), 7 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 1/7] extcon: add missing of_node_put after calling of_parse_phandle
  2016-07-01  9:41 ` Peter Chen
  (?)
@ 2016-07-01  9:41   ` Peter Chen
  -1 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-01  9:41 UTC (permalink / raw)
  To: linux-renesas-soc, linux-arm-kernel, linux-kernel, linux-pm,
	linux-samsung-soc
  Cc: Peter Chen, MyungJoo Ham, Chanwoo Choi

of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 drivers/extcon/extcon.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
index 21a123c..86ea14d 100644
--- a/drivers/extcon/extcon.c
+++ b/drivers/extcon/extcon.c
@@ -1107,10 +1107,12 @@ struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev, int index)
 	list_for_each_entry(edev, &extcon_dev_list, entry) {
 		if (edev->dev.parent && edev->dev.parent->of_node == node) {
 			mutex_unlock(&extcon_dev_list_lock);
+			of_node_put(node);
 			return edev;
 		}
 	}
 	mutex_unlock(&extcon_dev_list_lock);
+	of_node_put(node);
 
 	return ERR_PTR(-EPROBE_DEFER);
 }
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 1/7] extcon: add missing of_node_put after calling of_parse_phandle
@ 2016-07-01  9:41   ` Peter Chen
  0 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-01  9:41 UTC (permalink / raw)
  To: linux-renesas-soc, linux-arm-kernel, linux-kernel, linux-pm,
	linux-samsung-soc
  Cc: Peter Chen, MyungJoo Ham, Chanwoo Choi

of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 drivers/extcon/extcon.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
index 21a123c..86ea14d 100644
--- a/drivers/extcon/extcon.c
+++ b/drivers/extcon/extcon.c
@@ -1107,10 +1107,12 @@ struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev, int index)
 	list_for_each_entry(edev, &extcon_dev_list, entry) {
 		if (edev->dev.parent && edev->dev.parent->of_node == node) {
 			mutex_unlock(&extcon_dev_list_lock);
+			of_node_put(node);
 			return edev;
 		}
 	}
 	mutex_unlock(&extcon_dev_list_lock);
+	of_node_put(node);
 
 	return ERR_PTR(-EPROBE_DEFER);
 }
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 1/7] extcon: add missing of_node_put after calling of_parse_phandle
@ 2016-07-01  9:41   ` Peter Chen
  0 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-01  9:41 UTC (permalink / raw)
  To: linux-arm-kernel

of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 drivers/extcon/extcon.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
index 21a123c..86ea14d 100644
--- a/drivers/extcon/extcon.c
+++ b/drivers/extcon/extcon.c
@@ -1107,10 +1107,12 @@ struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev, int index)
 	list_for_each_entry(edev, &extcon_dev_list, entry) {
 		if (edev->dev.parent && edev->dev.parent->of_node == node) {
 			mutex_unlock(&extcon_dev_list_lock);
+			of_node_put(node);
 			return edev;
 		}
 	}
 	mutex_unlock(&extcon_dev_list_lock);
+	of_node_put(node);
 
 	return ERR_PTR(-EPROBE_DEFER);
 }
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 2/7] arm: mach-shmobile: pm-rmobile: add missing of_node_put after calling of_parse_phandle
  2016-07-01  9:41 ` Peter Chen
  (?)
@ 2016-07-01  9:41   ` Peter Chen
  -1 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-01  9:41 UTC (permalink / raw)
  To: linux-renesas-soc, linux-arm-kernel, linux-kernel, linux-pm,
	linux-samsung-soc
  Cc: Peter Chen, Simon Horman, Magnus Damm

of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Simon Horman <horms@verge.net.au>
Cc: Magnus Damm <magnus.damm@gmail.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 arch/arm/mach-shmobile/pm-rmobile.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-shmobile/pm-rmobile.c b/arch/arm/mach-shmobile/pm-rmobile.c
index c0b05e9..8eb2cb6 100644
--- a/arch/arm/mach-shmobile/pm-rmobile.c
+++ b/arch/arm/mach-shmobile/pm-rmobile.c
@@ -209,6 +209,7 @@ static void __init add_special_pd(struct device_node *np, enum pd_types type)
 	special_pds[num_special_pds].pd = pd;
 	special_pds[num_special_pds].type = type;
 	num_special_pds++;
+	of_node_put(pd);
 }
 
 static void __init get_special_pds(void)
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 2/7] arm: mach-shmobile: pm-rmobile: add missing of_node_put after calling of_parse_phandle
@ 2016-07-01  9:41   ` Peter Chen
  0 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-01  9:41 UTC (permalink / raw)
  To: linux-renesas-soc, linux-arm-kernel, linux-kernel, linux-pm,
	linux-samsung-soc
  Cc: Peter Chen, Simon Horman, Magnus Damm

of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Simon Horman <horms@verge.net.au>
Cc: Magnus Damm <magnus.damm@gmail.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 arch/arm/mach-shmobile/pm-rmobile.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-shmobile/pm-rmobile.c b/arch/arm/mach-shmobile/pm-rmobile.c
index c0b05e9..8eb2cb6 100644
--- a/arch/arm/mach-shmobile/pm-rmobile.c
+++ b/arch/arm/mach-shmobile/pm-rmobile.c
@@ -209,6 +209,7 @@ static void __init add_special_pd(struct device_node *np, enum pd_types type)
 	special_pds[num_special_pds].pd = pd;
 	special_pds[num_special_pds].type = type;
 	num_special_pds++;
+	of_node_put(pd);
 }
 
 static void __init get_special_pds(void)
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 2/7] arm: mach-shmobile: pm-rmobile: add missing of_node_put after calling of_parse_phandle
@ 2016-07-01  9:41   ` Peter Chen
  0 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-01  9:41 UTC (permalink / raw)
  To: linux-arm-kernel

of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Simon Horman <horms@verge.net.au>
Cc: Magnus Damm <magnus.damm@gmail.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 arch/arm/mach-shmobile/pm-rmobile.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-shmobile/pm-rmobile.c b/arch/arm/mach-shmobile/pm-rmobile.c
index c0b05e9..8eb2cb6 100644
--- a/arch/arm/mach-shmobile/pm-rmobile.c
+++ b/arch/arm/mach-shmobile/pm-rmobile.c
@@ -209,6 +209,7 @@ static void __init add_special_pd(struct device_node *np, enum pd_types type)
 	special_pds[num_special_pds].pd = pd;
 	special_pds[num_special_pds].type = type;
 	num_special_pds++;
+	of_node_put(pd);
 }
 
 static void __init get_special_pds(void)
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 3/7] arm: mach-u300: regulator: add missing of_node_put after calling of_parse_phandle
  2016-07-01  9:41 ` Peter Chen
@ 2016-07-01  9:41   ` Peter Chen
  -1 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-01  9:41 UTC (permalink / raw)
  To: linux-renesas-soc, linux-arm-kernel, linux-kernel, linux-pm,
	linux-samsung-soc
  Cc: Peter Chen, Linus Walleij

of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 arch/arm/mach-u300/regulator.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-u300/regulator.c b/arch/arm/mach-u300/regulator.c
index 595b574..509643e 100644
--- a/arch/arm/mach-u300/regulator.c
+++ b/arch/arm/mach-u300/regulator.c
@@ -71,19 +71,21 @@ static int __init __u300_init_boardpower(struct platform_device *pdev)
 	regmap = syscon_node_to_regmap(syscon_np);
 	if (IS_ERR(regmap)) {
 		pr_crit("U300: could not locate syscon regmap\n");
-		return PTR_ERR(regmap);
+		err = PTR_ERR(regmap);
+		goto error;
 	}
 
 	main_power_15 = regulator_get(&pdev->dev, "vana15");
 
 	if (IS_ERR(main_power_15)) {
 		pr_err("could not get vana15");
-		return PTR_ERR(main_power_15);
+		err = PTR_ERR(main_power_15);
+		goto error;
 	}
 	err = regulator_enable(main_power_15);
 	if (err) {
 		pr_err("could not enable vana15\n");
-		return err;
+		goto error;
 	}
 
 	/*
@@ -99,8 +101,12 @@ static int __init __u300_init_boardpower(struct platform_device *pdev)
 
 	/* Register globally exported PM poweroff hook */
 	pm_power_off = u300_pm_poweroff;
+	of_node_put(syscon_np);
 
 	return 0;
+error:
+	of_node_put(syscon_np);
+	return err;
 }
 
 static int __init s365_board_probe(struct platform_device *pdev)
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 3/7] arm: mach-u300: regulator: add missing of_node_put after calling of_parse_phandle
  2016-07-01  9:41 ` Peter Chen
                   ` (4 preceding siblings ...)
  (?)
@ 2016-07-01  9:41 ` Peter Chen
  -1 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-01  9:41 UTC (permalink / raw)
  To: linux-renesas-soc, linux-arm-kernel, linux-kernel, linux-pm,
	linux-samsung-soc
  Cc: Peter Chen, Linus Walleij

of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 arch/arm/mach-u300/regulator.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-u300/regulator.c b/arch/arm/mach-u300/regulator.c
index 595b574..509643e 100644
--- a/arch/arm/mach-u300/regulator.c
+++ b/arch/arm/mach-u300/regulator.c
@@ -71,19 +71,21 @@ static int __init __u300_init_boardpower(struct platform_device *pdev)
 	regmap = syscon_node_to_regmap(syscon_np);
 	if (IS_ERR(regmap)) {
 		pr_crit("U300: could not locate syscon regmap\n");
-		return PTR_ERR(regmap);
+		err = PTR_ERR(regmap);
+		goto error;
 	}
 
 	main_power_15 = regulator_get(&pdev->dev, "vana15");
 
 	if (IS_ERR(main_power_15)) {
 		pr_err("could not get vana15");
-		return PTR_ERR(main_power_15);
+		err = PTR_ERR(main_power_15);
+		goto error;
 	}
 	err = regulator_enable(main_power_15);
 	if (err) {
 		pr_err("could not enable vana15\n");
-		return err;
+		goto error;
 	}
 
 	/*
@@ -99,8 +101,12 @@ static int __init __u300_init_boardpower(struct platform_device *pdev)
 
 	/* Register globally exported PM poweroff hook */
 	pm_power_off = u300_pm_poweroff;
+	of_node_put(syscon_np);
 
 	return 0;
+error:
+	of_node_put(syscon_np);
+	return err;
 }
 
 static int __init s365_board_probe(struct platform_device *pdev)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 3/7] arm: mach-u300: regulator: add missing of_node_put after calling of_parse_phandle
  2016-07-01  9:41 ` Peter Chen
                   ` (2 preceding siblings ...)
  (?)
@ 2016-07-01  9:41 ` Peter Chen
  -1 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-01  9:41 UTC (permalink / raw)
  To: linux-renesas-soc, linux-arm-kernel, linux-kernel, linux-pm,
	linux-samsung-soc
  Cc: Peter Chen, Linus Walleij

of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 arch/arm/mach-u300/regulator.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-u300/regulator.c b/arch/arm/mach-u300/regulator.c
index 595b574..509643e 100644
--- a/arch/arm/mach-u300/regulator.c
+++ b/arch/arm/mach-u300/regulator.c
@@ -71,19 +71,21 @@ static int __init __u300_init_boardpower(struct platform_device *pdev)
 	regmap = syscon_node_to_regmap(syscon_np);
 	if (IS_ERR(regmap)) {
 		pr_crit("U300: could not locate syscon regmap\n");
-		return PTR_ERR(regmap);
+		err = PTR_ERR(regmap);
+		goto error;
 	}
 
 	main_power_15 = regulator_get(&pdev->dev, "vana15");
 
 	if (IS_ERR(main_power_15)) {
 		pr_err("could not get vana15");
-		return PTR_ERR(main_power_15);
+		err = PTR_ERR(main_power_15);
+		goto error;
 	}
 	err = regulator_enable(main_power_15);
 	if (err) {
 		pr_err("could not enable vana15\n");
-		return err;
+		goto error;
 	}
 
 	/*
@@ -99,8 +101,12 @@ static int __init __u300_init_boardpower(struct platform_device *pdev)
 
 	/* Register globally exported PM poweroff hook */
 	pm_power_off = u300_pm_poweroff;
+	of_node_put(syscon_np);
 
 	return 0;
+error:
+	of_node_put(syscon_np);
+	return err;
 }
 
 static int __init s365_board_probe(struct platform_device *pdev)
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 3/7] arm: mach-u300: regulator: add missing of_node_put after calling of_parse_phandle
  2016-07-01  9:41 ` Peter Chen
                   ` (6 preceding siblings ...)
  (?)
@ 2016-07-01  9:41 ` Peter Chen
  -1 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-01  9:41 UTC (permalink / raw)
  To: linux-renesas-soc, linux-arm-kernel, linux-kernel, linux-pm,
	linux-samsung-soc
  Cc: Peter Chen, Linus Walleij

of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 arch/arm/mach-u300/regulator.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-u300/regulator.c b/arch/arm/mach-u300/regulator.c
index 595b574..509643e 100644
--- a/arch/arm/mach-u300/regulator.c
+++ b/arch/arm/mach-u300/regulator.c
@@ -71,19 +71,21 @@ static int __init __u300_init_boardpower(struct platform_device *pdev)
 	regmap = syscon_node_to_regmap(syscon_np);
 	if (IS_ERR(regmap)) {
 		pr_crit("U300: could not locate syscon regmap\n");
-		return PTR_ERR(regmap);
+		err = PTR_ERR(regmap);
+		goto error;
 	}
 
 	main_power_15 = regulator_get(&pdev->dev, "vana15");
 
 	if (IS_ERR(main_power_15)) {
 		pr_err("could not get vana15");
-		return PTR_ERR(main_power_15);
+		err = PTR_ERR(main_power_15);
+		goto error;
 	}
 	err = regulator_enable(main_power_15);
 	if (err) {
 		pr_err("could not enable vana15\n");
-		return err;
+		goto error;
 	}
 
 	/*
@@ -99,8 +101,12 @@ static int __init __u300_init_boardpower(struct platform_device *pdev)
 
 	/* Register globally exported PM poweroff hook */
 	pm_power_off = u300_pm_poweroff;
+	of_node_put(syscon_np);
 
 	return 0;
+error:
+	of_node_put(syscon_np);
+	return err;
 }
 
 static int __init s365_board_probe(struct platform_device *pdev)
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 3/7] arm: mach-u300: regulator: add missing of_node_put after calling of_parse_phandle
  2016-07-01  9:41 ` Peter Chen
                   ` (5 preceding siblings ...)
  (?)
@ 2016-07-01  9:41 ` Peter Chen
  -1 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-01  9:41 UTC (permalink / raw)
  To: linux-renesas-soc, linux-arm-kernel, linux-kernel, linux-pm,
	linux-samsung-soc
  Cc: Peter Chen, Linus Walleij

of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 arch/arm/mach-u300/regulator.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-u300/regulator.c b/arch/arm/mach-u300/regulator.c
index 595b574..509643e 100644
--- a/arch/arm/mach-u300/regulator.c
+++ b/arch/arm/mach-u300/regulator.c
@@ -71,19 +71,21 @@ static int __init __u300_init_boardpower(struct platform_device *pdev)
 	regmap = syscon_node_to_regmap(syscon_np);
 	if (IS_ERR(regmap)) {
 		pr_crit("U300: could not locate syscon regmap\n");
-		return PTR_ERR(regmap);
+		err = PTR_ERR(regmap);
+		goto error;
 	}
 
 	main_power_15 = regulator_get(&pdev->dev, "vana15");
 
 	if (IS_ERR(main_power_15)) {
 		pr_err("could not get vana15");
-		return PTR_ERR(main_power_15);
+		err = PTR_ERR(main_power_15);
+		goto error;
 	}
 	err = regulator_enable(main_power_15);
 	if (err) {
 		pr_err("could not enable vana15\n");
-		return err;
+		goto error;
 	}
 
 	/*
@@ -99,8 +101,12 @@ static int __init __u300_init_boardpower(struct platform_device *pdev)
 
 	/* Register globally exported PM poweroff hook */
 	pm_power_off = u300_pm_poweroff;
+	of_node_put(syscon_np);
 
 	return 0;
+error:
+	of_node_put(syscon_np);
+	return err;
 }
 
 static int __init s365_board_probe(struct platform_device *pdev)
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 3/7] arm: mach-u300: regulator: add missing of_node_put after calling of_parse_phandle
@ 2016-07-01  9:41   ` Peter Chen
  0 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-01  9:41 UTC (permalink / raw)
  To: linux-arm-kernel

of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 arch/arm/mach-u300/regulator.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-u300/regulator.c b/arch/arm/mach-u300/regulator.c
index 595b574..509643e 100644
--- a/arch/arm/mach-u300/regulator.c
+++ b/arch/arm/mach-u300/regulator.c
@@ -71,19 +71,21 @@ static int __init __u300_init_boardpower(struct platform_device *pdev)
 	regmap = syscon_node_to_regmap(syscon_np);
 	if (IS_ERR(regmap)) {
 		pr_crit("U300: could not locate syscon regmap\n");
-		return PTR_ERR(regmap);
+		err = PTR_ERR(regmap);
+		goto error;
 	}
 
 	main_power_15 = regulator_get(&pdev->dev, "vana15");
 
 	if (IS_ERR(main_power_15)) {
 		pr_err("could not get vana15");
-		return PTR_ERR(main_power_15);
+		err = PTR_ERR(main_power_15);
+		goto error;
 	}
 	err = regulator_enable(main_power_15);
 	if (err) {
 		pr_err("could not enable vana15\n");
-		return err;
+		goto error;
 	}
 
 	/*
@@ -99,8 +101,12 @@ static int __init __u300_init_boardpower(struct platform_device *pdev)
 
 	/* Register globally exported PM poweroff hook */
 	pm_power_off = u300_pm_poweroff;
+	of_node_put(syscon_np);
 
 	return 0;
+error:
+	of_node_put(syscon_np);
+	return err;
 }
 
 static int __init s365_board_probe(struct platform_device *pdev)
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 4/7] bus: arm-cci: add missing of_node_put after calling of_parse_phandle
  2016-07-01  9:41 ` Peter Chen
  (?)
@ 2016-07-01  9:41   ` Peter Chen
  -1 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-01  9:41 UTC (permalink / raw)
  To: linux-renesas-soc, linux-arm-kernel, linux-kernel, linux-pm,
	linux-samsung-soc
  Cc: Peter Chen, Will Deacon, Suzuki K Poulose

of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Will Deacon <will.deacon@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 drivers/bus/arm-cci.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c
index a49b283..e7b0b8c 100644
--- a/drivers/bus/arm-cci.c
+++ b/drivers/bus/arm-cci.c
@@ -1912,9 +1912,12 @@ static int __cci_ace_get_port(struct device_node *dn, int type)
 	cci_portn = of_parse_phandle(dn, "cci-control-port", 0);
 	for (i = 0; i < nb_cci_ports; i++) {
 		ace_match = ports[i].type == type;
-		if (ace_match && cci_portn == ports[i].dn)
+		if (ace_match && cci_portn == ports[i].dn) {
+			of_node_put(cci_portn);
 			return i;
+		}
 	}
+	of_node_put(cci_portn);
 	return -ENODEV;
 }
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 4/7] bus: arm-cci: add missing of_node_put after calling of_parse_phandle
@ 2016-07-01  9:41   ` Peter Chen
  0 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-01  9:41 UTC (permalink / raw)
  To: linux-renesas-soc, linux-arm-kernel, linux-kernel, linux-pm,
	linux-samsung-soc
  Cc: Peter Chen, Will Deacon, Suzuki K Poulose

of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Will Deacon <will.deacon@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 drivers/bus/arm-cci.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c
index a49b283..e7b0b8c 100644
--- a/drivers/bus/arm-cci.c
+++ b/drivers/bus/arm-cci.c
@@ -1912,9 +1912,12 @@ static int __cci_ace_get_port(struct device_node *dn, int type)
 	cci_portn = of_parse_phandle(dn, "cci-control-port", 0);
 	for (i = 0; i < nb_cci_ports; i++) {
 		ace_match = ports[i].type == type;
-		if (ace_match && cci_portn == ports[i].dn)
+		if (ace_match && cci_portn == ports[i].dn) {
+			of_node_put(cci_portn);
 			return i;
+		}
 	}
+	of_node_put(cci_portn);
 	return -ENODEV;
 }
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 4/7] bus: arm-cci: add missing of_node_put after calling of_parse_phandle
@ 2016-07-01  9:41   ` Peter Chen
  0 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-01  9:41 UTC (permalink / raw)
  To: linux-arm-kernel

of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Will Deacon <will.deacon@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 drivers/bus/arm-cci.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c
index a49b283..e7b0b8c 100644
--- a/drivers/bus/arm-cci.c
+++ b/drivers/bus/arm-cci.c
@@ -1912,9 +1912,12 @@ static int __cci_ace_get_port(struct device_node *dn, int type)
 	cci_portn = of_parse_phandle(dn, "cci-control-port", 0);
 	for (i = 0; i < nb_cci_ports; i++) {
 		ace_match = ports[i].type == type;
-		if (ace_match && cci_portn == ports[i].dn)
+		if (ace_match && cci_portn == ports[i].dn) {
+			of_node_put(cci_portn);
 			return i;
+		}
 	}
+	of_node_put(cci_portn);
 	return -ENODEV;
 }
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 5/7] bus: vexpress-config: add missing of_node_put after calling of_parse_phandle
  2016-07-01  9:41 ` Peter Chen
  (?)
@ 2016-07-01  9:41   ` Peter Chen
  -1 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-01  9:41 UTC (permalink / raw)
  To: linux-renesas-soc, linux-arm-kernel, linux-kernel, linux-pm,
	linux-samsung-soc
  Cc: Peter Chen, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi

of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 drivers/bus/vexpress-config.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/bus/vexpress-config.c b/drivers/bus/vexpress-config.c
index c3cb76b..9efdf1d 100644
--- a/drivers/bus/vexpress-config.c
+++ b/drivers/bus/vexpress-config.c
@@ -178,6 +178,7 @@ static int vexpress_config_populate(struct device_node *node)
 
 	parent = class_find_device(vexpress_config_class, NULL, bridge,
 			vexpress_config_node_match);
+	of_node_put(bridge);
 	if (WARN_ON(!parent))
 		return -ENODEV;
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 5/7] bus: vexpress-config: add missing of_node_put after calling of_parse_phandle
@ 2016-07-01  9:41   ` Peter Chen
  0 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-01  9:41 UTC (permalink / raw)
  To: linux-renesas-soc, linux-arm-kernel, linux-kernel, linux-pm,
	linux-samsung-soc
  Cc: Peter Chen, Lorenzo Pieralisi, Liviu Dudau, Sudeep Holla

of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 drivers/bus/vexpress-config.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/bus/vexpress-config.c b/drivers/bus/vexpress-config.c
index c3cb76b..9efdf1d 100644
--- a/drivers/bus/vexpress-config.c
+++ b/drivers/bus/vexpress-config.c
@@ -178,6 +178,7 @@ static int vexpress_config_populate(struct device_node *node)
 
 	parent = class_find_device(vexpress_config_class, NULL, bridge,
 			vexpress_config_node_match);
+	of_node_put(bridge);
 	if (WARN_ON(!parent))
 		return -ENODEV;
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 5/7] bus: vexpress-config: add missing of_node_put after calling of_parse_phandle
@ 2016-07-01  9:41   ` Peter Chen
  0 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-01  9:41 UTC (permalink / raw)
  To: linux-arm-kernel

of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 drivers/bus/vexpress-config.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/bus/vexpress-config.c b/drivers/bus/vexpress-config.c
index c3cb76b..9efdf1d 100644
--- a/drivers/bus/vexpress-config.c
+++ b/drivers/bus/vexpress-config.c
@@ -178,6 +178,7 @@ static int vexpress_config_populate(struct device_node *node)
 
 	parent = class_find_device(vexpress_config_class, NULL, bridge,
 			vexpress_config_node_match);
+	of_node_put(bridge);
 	if (WARN_ON(!parent))
 		return -ENODEV;
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 6/7] devfreq: add missing of_node_put after calling of_parse_phandle
  2016-07-01  9:41 ` Peter Chen
  (?)
@ 2016-07-01  9:42   ` Peter Chen
  -1 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-01  9:42 UTC (permalink / raw)
  To: linux-renesas-soc, linux-arm-kernel, linux-kernel, linux-pm,
	linux-samsung-soc
  Cc: Peter Chen, MyungJoo Ham, Kyungmin Park

of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 drivers/devfreq/devfreq.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index 1d6c803..3f2142f 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -706,10 +706,12 @@ struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index)
 		if (devfreq->dev.parent
 			&& devfreq->dev.parent->of_node == node) {
 			mutex_unlock(&devfreq_list_lock);
+			of_node_put(node);
 			return devfreq;
 		}
 	}
 	mutex_unlock(&devfreq_list_lock);
+	of_node_put(node);
 
 	return ERR_PTR(-EPROBE_DEFER);
 }
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 6/7] devfreq: add missing of_node_put after calling of_parse_phandle
@ 2016-07-01  9:42   ` Peter Chen
  0 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-01  9:42 UTC (permalink / raw)
  To: linux-renesas-soc, linux-arm-kernel, linux-kernel, linux-pm,
	linux-samsung-soc
  Cc: Peter Chen, Kyungmin Park, MyungJoo Ham

of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 drivers/devfreq/devfreq.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index 1d6c803..3f2142f 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -706,10 +706,12 @@ struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index)
 		if (devfreq->dev.parent
 			&& devfreq->dev.parent->of_node == node) {
 			mutex_unlock(&devfreq_list_lock);
+			of_node_put(node);
 			return devfreq;
 		}
 	}
 	mutex_unlock(&devfreq_list_lock);
+	of_node_put(node);
 
 	return ERR_PTR(-EPROBE_DEFER);
 }
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 6/7] devfreq: add missing of_node_put after calling of_parse_phandle
@ 2016-07-01  9:42   ` Peter Chen
  0 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-01  9:42 UTC (permalink / raw)
  To: linux-arm-kernel

of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 drivers/devfreq/devfreq.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index 1d6c803..3f2142f 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -706,10 +706,12 @@ struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index)
 		if (devfreq->dev.parent
 			&& devfreq->dev.parent->of_node == node) {
 			mutex_unlock(&devfreq_list_lock);
+			of_node_put(node);
 			return devfreq;
 		}
 	}
 	mutex_unlock(&devfreq_list_lock);
+	of_node_put(node);
 
 	return ERR_PTR(-EPROBE_DEFER);
 }
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 7/7] devfreq: exynos-bus: add missing of_node_put after calling of_parse_phandle
  2016-07-01  9:41 ` Peter Chen
  (?)
@ 2016-07-01  9:42   ` Peter Chen
  -1 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-01  9:42 UTC (permalink / raw)
  To: linux-renesas-soc, linux-arm-kernel, linux-kernel, linux-pm,
	linux-samsung-soc
  Cc: Peter Chen, Chanwoo Choi, MyungJoo Ham, Kyungmin Park,
	Kukjin Kim, Krzysztof Kozlowski

of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Chanwoo Choi <cw00.choi@samsung.com>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 drivers/devfreq/exynos-bus.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
index 2363d0a..a38b5ec 100644
--- a/drivers/devfreq/exynos-bus.c
+++ b/drivers/devfreq/exynos-bus.c
@@ -383,7 +383,7 @@ err_clk:
 static int exynos_bus_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
-	struct device_node *np = dev->of_node;
+	struct device_node *np = dev->of_node, node;
 	struct devfreq_dev_profile *profile;
 	struct devfreq_simple_ondemand_data *ondemand_data;
 	struct devfreq_passive_data *passive_data;
@@ -415,10 +415,13 @@ static int exynos_bus_probe(struct platform_device *pdev)
 		goto err;
 	}
 
-	if (of_parse_phandle(dev->of_node, "devfreq", 0))
+	node = of_parse_phandle(dev->of_node, "devfreq", 0);
+	if (node) {
+		of_node_put(node);
 		goto passive;
-	else
+	} else {
 		ret = exynos_bus_parent_parse_of(np, bus);
+	}
 
 	if (ret < 0)
 		goto err;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 7/7] devfreq: exynos-bus: add missing of_node_put after calling of_parse_phandle
@ 2016-07-01  9:42   ` Peter Chen
  0 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-01  9:42 UTC (permalink / raw)
  To: linux-renesas-soc, linux-arm-kernel, linux-kernel, linux-pm,
	linux-samsung-soc
  Cc: Peter Chen, Krzysztof Kozlowski, Chanwoo Choi, Kyungmin Park,
	MyungJoo Ham, Kukjin Kim

of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Chanwoo Choi <cw00.choi@samsung.com>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 drivers/devfreq/exynos-bus.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
index 2363d0a..a38b5ec 100644
--- a/drivers/devfreq/exynos-bus.c
+++ b/drivers/devfreq/exynos-bus.c
@@ -383,7 +383,7 @@ err_clk:
 static int exynos_bus_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
-	struct device_node *np = dev->of_node;
+	struct device_node *np = dev->of_node, node;
 	struct devfreq_dev_profile *profile;
 	struct devfreq_simple_ondemand_data *ondemand_data;
 	struct devfreq_passive_data *passive_data;
@@ -415,10 +415,13 @@ static int exynos_bus_probe(struct platform_device *pdev)
 		goto err;
 	}
 
-	if (of_parse_phandle(dev->of_node, "devfreq", 0))
+	node = of_parse_phandle(dev->of_node, "devfreq", 0);
+	if (node) {
+		of_node_put(node);
 		goto passive;
-	else
+	} else {
 		ret = exynos_bus_parent_parse_of(np, bus);
+	}
 
 	if (ret < 0)
 		goto err;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 7/7] devfreq: exynos-bus: add missing of_node_put after calling of_parse_phandle
@ 2016-07-01  9:42   ` Peter Chen
  0 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-01  9:42 UTC (permalink / raw)
  To: linux-arm-kernel

of_node_put needs to be called when the device node which is got
from of_parse_phandle has finished using.

Cc: Chanwoo Choi <cw00.choi@samsung.com>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 drivers/devfreq/exynos-bus.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
index 2363d0a..a38b5ec 100644
--- a/drivers/devfreq/exynos-bus.c
+++ b/drivers/devfreq/exynos-bus.c
@@ -383,7 +383,7 @@ err_clk:
 static int exynos_bus_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
-	struct device_node *np = dev->of_node;
+	struct device_node *np = dev->of_node, node;
 	struct devfreq_dev_profile *profile;
 	struct devfreq_simple_ondemand_data *ondemand_data;
 	struct devfreq_passive_data *passive_data;
@@ -415,10 +415,13 @@ static int exynos_bus_probe(struct platform_device *pdev)
 		goto err;
 	}
 
-	if (of_parse_phandle(dev->of_node, "devfreq", 0))
+	node = of_parse_phandle(dev->of_node, "devfreq", 0);
+	if (node) {
+		of_node_put(node);
 		goto passive;
-	else
+	} else {
 		ret = exynos_bus_parent_parse_of(np, bus);
+	}
 
 	if (ret < 0)
 		goto err;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* Re: [PATCH 4/7] bus: arm-cci: add missing of_node_put after calling of_parse_phandle
  2016-07-01  9:41   ` Peter Chen
@ 2016-07-01 10:29     ` Suzuki K Poulose
  -1 siblings, 0 replies; 58+ messages in thread
From: Suzuki K Poulose @ 2016-07-01 10:29 UTC (permalink / raw)
  To: Peter Chen, linux-renesas-soc, linux-arm-kernel, linux-kernel,
	linux-pm, linux-samsung-soc
  Cc: Will Deacon, Sudeep Holla

On 01/07/16 10:41, Peter Chen wrote:
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>

Thanks for the fix.

> ---
>   drivers/bus/arm-cci.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c
> index a49b283..e7b0b8c 100644
> --- a/drivers/bus/arm-cci.c
> +++ b/drivers/bus/arm-cci.c
> @@ -1912,9 +1912,12 @@ static int __cci_ace_get_port(struct device_node *dn, int type)
>   	cci_portn = of_parse_phandle(dn, "cci-control-port", 0);
>   	for (i = 0; i < nb_cci_ports; i++) {
>   		ace_match = ports[i].type == type;
> -		if (ace_match && cci_portn == ports[i].dn)
> +		if (ace_match && cci_portn == ports[i].dn) {
> +			of_node_put(cci_portn);
>   			return i;
> +		}
>   	}
> +	of_node_put(cci_portn);

nit: Could we please do some thing like this ?
		if (ace_match && cci_portn == ports[i].dn)
			break;
	}

	of_node_put(cci_portn);
	return (i < nb_cci_ports) ? i : -ENODEV ;

Either way,

Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 4/7] bus: arm-cci: add missing of_node_put after calling of_parse_phandle
@ 2016-07-01 10:29     ` Suzuki K Poulose
  0 siblings, 0 replies; 58+ messages in thread
From: Suzuki K Poulose @ 2016-07-01 10:29 UTC (permalink / raw)
  To: linux-arm-kernel

On 01/07/16 10:41, Peter Chen wrote:
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>

Thanks for the fix.

> ---
>   drivers/bus/arm-cci.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c
> index a49b283..e7b0b8c 100644
> --- a/drivers/bus/arm-cci.c
> +++ b/drivers/bus/arm-cci.c
> @@ -1912,9 +1912,12 @@ static int __cci_ace_get_port(struct device_node *dn, int type)
>   	cci_portn = of_parse_phandle(dn, "cci-control-port", 0);
>   	for (i = 0; i < nb_cci_ports; i++) {
>   		ace_match = ports[i].type == type;
> -		if (ace_match && cci_portn == ports[i].dn)
> +		if (ace_match && cci_portn == ports[i].dn) {
> +			of_node_put(cci_portn);
>   			return i;
> +		}
>   	}
> +	of_node_put(cci_portn);

nit: Could we please do some thing like this ?
		if (ace_match && cci_portn == ports[i].dn)
			break;
	}

	of_node_put(cci_portn);
	return (i < nb_cci_ports) ? i : -ENODEV ;

Either way,

Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 4/7] bus: arm-cci: add missing of_node_put after calling of_parse_phandle
  2016-07-01 10:29     ` Suzuki K Poulose
@ 2016-07-01 10:33       ` Will Deacon
  -1 siblings, 0 replies; 58+ messages in thread
From: Will Deacon @ 2016-07-01 10:33 UTC (permalink / raw)
  To: Suzuki K Poulose
  Cc: Peter Chen, linux-renesas-soc, linux-arm-kernel, linux-kernel,
	linux-pm, linux-samsung-soc, Sudeep Holla

On Fri, Jul 01, 2016 at 11:29:58AM +0100, Suzuki K Poulose wrote:
> On 01/07/16 10:41, Peter Chen wrote:
> >of_node_put needs to be called when the device node which is got
> >from of_parse_phandle has finished using.
> >
> >Cc: Will Deacon <will.deacon@arm.com>
> >Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
> >Signed-off-by: Peter Chen <peter.chen@nxp.com>
> 
> Thanks for the fix.
> 
> >---
> >  drivers/bus/arm-cci.c | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> >
> >diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c
> >index a49b283..e7b0b8c 100644
> >--- a/drivers/bus/arm-cci.c
> >+++ b/drivers/bus/arm-cci.c
> >@@ -1912,9 +1912,12 @@ static int __cci_ace_get_port(struct device_node *dn, int type)
> >  	cci_portn = of_parse_phandle(dn, "cci-control-port", 0);
> >  	for (i = 0; i < nb_cci_ports; i++) {
> >  		ace_match = ports[i].type == type;
> >-		if (ace_match && cci_portn == ports[i].dn)
> >+		if (ace_match && cci_portn == ports[i].dn) {
> >+			of_node_put(cci_portn);
> >  			return i;
> >+		}
> >  	}
> >+	of_node_put(cci_portn);
> 
> nit: Could we please do some thing like this ?
> 		if (ace_match && cci_portn == ports[i].dn)
> 			break;
> 	}
> 
> 	of_node_put(cci_portn);
> 	return (i < nb_cci_ports) ? i : -ENODEV ;
> 
> Either way,
> 
> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>

Please route this via arm-soc once you've addressed Suzuki's comment.

Will

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 4/7] bus: arm-cci: add missing of_node_put after calling of_parse_phandle
@ 2016-07-01 10:33       ` Will Deacon
  0 siblings, 0 replies; 58+ messages in thread
From: Will Deacon @ 2016-07-01 10:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jul 01, 2016 at 11:29:58AM +0100, Suzuki K Poulose wrote:
> On 01/07/16 10:41, Peter Chen wrote:
> >of_node_put needs to be called when the device node which is got
> >from of_parse_phandle has finished using.
> >
> >Cc: Will Deacon <will.deacon@arm.com>
> >Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
> >Signed-off-by: Peter Chen <peter.chen@nxp.com>
> 
> Thanks for the fix.
> 
> >---
> >  drivers/bus/arm-cci.c | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> >
> >diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c
> >index a49b283..e7b0b8c 100644
> >--- a/drivers/bus/arm-cci.c
> >+++ b/drivers/bus/arm-cci.c
> >@@ -1912,9 +1912,12 @@ static int __cci_ace_get_port(struct device_node *dn, int type)
> >  	cci_portn = of_parse_phandle(dn, "cci-control-port", 0);
> >  	for (i = 0; i < nb_cci_ports; i++) {
> >  		ace_match = ports[i].type == type;
> >-		if (ace_match && cci_portn == ports[i].dn)
> >+		if (ace_match && cci_portn == ports[i].dn) {
> >+			of_node_put(cci_portn);
> >  			return i;
> >+		}
> >  	}
> >+	of_node_put(cci_portn);
> 
> nit: Could we please do some thing like this ?
> 		if (ace_match && cci_portn == ports[i].dn)
> 			break;
> 	}
> 
> 	of_node_put(cci_portn);
> 	return (i < nb_cci_ports) ? i : -ENODEV ;
> 
> Either way,
> 
> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>

Please route this via arm-soc once you've addressed Suzuki's comment.

Will

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 2/7] arm: mach-shmobile: pm-rmobile: add missing of_node_put after calling of_parse_phandle
  2016-07-01  9:41   ` Peter Chen
  (?)
@ 2016-07-01 12:31     ` Geert Uytterhoeven
  -1 siblings, 0 replies; 58+ messages in thread
From: Geert Uytterhoeven @ 2016-07-01 12:31 UTC (permalink / raw)
  To: Peter Chen
  Cc: Linux-Renesas, linux-arm-kernel, linux-kernel, Linux PM list,
	linux-samsung-soc, Simon Horman, Magnus Damm

Hi Peter,

On Fri, Jul 1, 2016 at 11:41 AM, Peter Chen <peter.chen@nxp.com> wrote:
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>
> Cc: Simon Horman <horms@verge.net.au>
> Cc: Magnus Damm <magnus.damm@gmail.com>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>

NAKed-by: Geert Uytterhoeven <geert+renesas@glider.be>

> --- a/arch/arm/mach-shmobile/pm-rmobile.c
> +++ b/arch/arm/mach-shmobile/pm-rmobile.c
> @@ -209,6 +209,7 @@ static void __init add_special_pd(struct device_node *np, enum pd_types type)
>         special_pds[num_special_pds].pd = pd;

The pd pointer is stored in the line above, and released later in
put_special_pds().

>         special_pds[num_special_pds].type = type;
>         num_special_pds++;
> +       of_node_put(pd);

Hence it must not be released here, as that would cause a double release
when put_special_pds() is executed.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 2/7] arm: mach-shmobile: pm-rmobile: add missing of_node_put after calling of_parse_phandle
@ 2016-07-01 12:31     ` Geert Uytterhoeven
  0 siblings, 0 replies; 58+ messages in thread
From: Geert Uytterhoeven @ 2016-07-01 12:31 UTC (permalink / raw)
  To: Peter Chen
  Cc: Linux-Renesas, linux-arm-kernel, linux-kernel, Linux PM list,
	linux-samsung-soc, Simon Horman, Magnus Damm

Hi Peter,

On Fri, Jul 1, 2016 at 11:41 AM, Peter Chen <peter.chen@nxp.com> wrote:
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>
> Cc: Simon Horman <horms@verge.net.au>
> Cc: Magnus Damm <magnus.damm@gmail.com>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>

NAKed-by: Geert Uytterhoeven <geert+renesas@glider.be>

> --- a/arch/arm/mach-shmobile/pm-rmobile.c
> +++ b/arch/arm/mach-shmobile/pm-rmobile.c
> @@ -209,6 +209,7 @@ static void __init add_special_pd(struct device_node *np, enum pd_types type)
>         special_pds[num_special_pds].pd = pd;

The pd pointer is stored in the line above, and released later in
put_special_pds().

>         special_pds[num_special_pds].type = type;
>         num_special_pds++;
> +       of_node_put(pd);

Hence it must not be released here, as that would cause a double release
when put_special_pds() is executed.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 2/7] arm: mach-shmobile: pm-rmobile: add missing of_node_put after calling of_parse_phandle
@ 2016-07-01 12:31     ` Geert Uytterhoeven
  0 siblings, 0 replies; 58+ messages in thread
From: Geert Uytterhoeven @ 2016-07-01 12:31 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Peter,

On Fri, Jul 1, 2016 at 11:41 AM, Peter Chen <peter.chen@nxp.com> wrote:
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>
> Cc: Simon Horman <horms@verge.net.au>
> Cc: Magnus Damm <magnus.damm@gmail.com>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>

NAKed-by: Geert Uytterhoeven <geert+renesas@glider.be>

> --- a/arch/arm/mach-shmobile/pm-rmobile.c
> +++ b/arch/arm/mach-shmobile/pm-rmobile.c
> @@ -209,6 +209,7 @@ static void __init add_special_pd(struct device_node *np, enum pd_types type)
>         special_pds[num_special_pds].pd = pd;

The pd pointer is stored in the line above, and released later in
put_special_pds().

>         special_pds[num_special_pds].type = type;
>         num_special_pds++;
> +       of_node_put(pd);

Hence it must not be released here, as that would cause a double release
when put_special_pds() is executed.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 1/7] extcon: add missing of_node_put after calling of_parse_phandle
  2016-07-01  9:41   ` Peter Chen
  (?)
@ 2016-07-02  4:46     ` Chanwoo Choi
  -1 siblings, 0 replies; 58+ messages in thread
From: Chanwoo Choi @ 2016-07-02  4:46 UTC (permalink / raw)
  To: Peter Chen
  Cc: linux-renesas-soc, linux-arm-kernel, linux-kernel, linux-pm,
	linux-samsung-soc, MyungJoo Ham, Chanwoo Choi

Hi Peter,

Applied it.

Regards,
Chanwoo Choi

2016-07-01 18:41 GMT+09:00 Peter Chen <peter.chen@nxp.com>:
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>
> Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
> Cc: Chanwoo Choi <cw00.choi@samsung.com>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
> ---
>  drivers/extcon/extcon.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
> index 21a123c..86ea14d 100644
> --- a/drivers/extcon/extcon.c
> +++ b/drivers/extcon/extcon.c
> @@ -1107,10 +1107,12 @@ struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev, int index)
>         list_for_each_entry(edev, &extcon_dev_list, entry) {
>                 if (edev->dev.parent && edev->dev.parent->of_node == node) {
>                         mutex_unlock(&extcon_dev_list_lock);
> +                       of_node_put(node);
>                         return edev;
>                 }
>         }
>         mutex_unlock(&extcon_dev_list_lock);
> +       of_node_put(node);
>
>         return ERR_PTR(-EPROBE_DEFER);
>  }
> --
> 1.9.1
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 1/7] extcon: add missing of_node_put after calling of_parse_phandle
@ 2016-07-02  4:46     ` Chanwoo Choi
  0 siblings, 0 replies; 58+ messages in thread
From: Chanwoo Choi @ 2016-07-02  4:46 UTC (permalink / raw)
  To: Peter Chen
  Cc: linux-samsung-soc, linux-pm, linux-kernel, linux-renesas-soc,
	Chanwoo Choi, MyungJoo Ham, linux-arm-kernel

Hi Peter,

Applied it.

Regards,
Chanwoo Choi

2016-07-01 18:41 GMT+09:00 Peter Chen <peter.chen@nxp.com>:
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>
> Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
> Cc: Chanwoo Choi <cw00.choi@samsung.com>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
> ---
>  drivers/extcon/extcon.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
> index 21a123c..86ea14d 100644
> --- a/drivers/extcon/extcon.c
> +++ b/drivers/extcon/extcon.c
> @@ -1107,10 +1107,12 @@ struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev, int index)
>         list_for_each_entry(edev, &extcon_dev_list, entry) {
>                 if (edev->dev.parent && edev->dev.parent->of_node == node) {
>                         mutex_unlock(&extcon_dev_list_lock);
> +                       of_node_put(node);
>                         return edev;
>                 }
>         }
>         mutex_unlock(&extcon_dev_list_lock);
> +       of_node_put(node);
>
>         return ERR_PTR(-EPROBE_DEFER);
>  }
> --
> 1.9.1
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 1/7] extcon: add missing of_node_put after calling of_parse_phandle
@ 2016-07-02  4:46     ` Chanwoo Choi
  0 siblings, 0 replies; 58+ messages in thread
From: Chanwoo Choi @ 2016-07-02  4:46 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Peter,

Applied it.

Regards,
Chanwoo Choi

2016-07-01 18:41 GMT+09:00 Peter Chen <peter.chen@nxp.com>:
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>
> Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
> Cc: Chanwoo Choi <cw00.choi@samsung.com>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
> ---
>  drivers/extcon/extcon.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
> index 21a123c..86ea14d 100644
> --- a/drivers/extcon/extcon.c
> +++ b/drivers/extcon/extcon.c
> @@ -1107,10 +1107,12 @@ struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev, int index)
>         list_for_each_entry(edev, &extcon_dev_list, entry) {
>                 if (edev->dev.parent && edev->dev.parent->of_node == node) {
>                         mutex_unlock(&extcon_dev_list_lock);
> +                       of_node_put(node);
>                         return edev;
>                 }
>         }
>         mutex_unlock(&extcon_dev_list_lock);
> +       of_node_put(node);
>
>         return ERR_PTR(-EPROBE_DEFER);
>  }
> --
> 1.9.1
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 7/7] devfreq: exynos-bus: add missing of_node_put after calling of_parse_phandle
  2016-07-01  9:42   ` Peter Chen
@ 2016-07-02  4:53     ` Chanwoo Choi
  -1 siblings, 0 replies; 58+ messages in thread
From: Chanwoo Choi @ 2016-07-02  4:53 UTC (permalink / raw)
  To: Peter Chen
  Cc: linux-renesas-soc, linux-arm-kernel, linux-kernel, linux-pm,
	linux-samsung-soc, Krzysztof Kozlowski, Chanwoo Choi,
	Kyungmin Park, MyungJoo Ham, Kukjin Kim

Hi Peter,

2016-07-01 18:42 GMT+09:00 Peter Chen <peter.chen@nxp.com>:
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>
> Cc: Chanwoo Choi <cw00.choi@samsung.com>
> Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
> ---
>  drivers/devfreq/exynos-bus.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
> index 2363d0a..a38b5ec 100644
> --- a/drivers/devfreq/exynos-bus.c
> +++ b/drivers/devfreq/exynos-bus.c
> @@ -383,7 +383,7 @@ err_clk:
>  static int exynos_bus_probe(struct platform_device *pdev)
>  {
>         struct device *dev = &pdev->dev;
> -       struct device_node *np = dev->of_node;
> +       struct device_node *np = dev->of_node, node;
>         struct devfreq_dev_profile *profile;
>         struct devfreq_simple_ondemand_data *ondemand_data;
>         struct devfreq_passive_data *passive_data;
> @@ -415,10 +415,13 @@ static int exynos_bus_probe(struct platform_device *pdev)
>                 goto err;
>         }
>
> -       if (of_parse_phandle(dev->of_node, "devfreq", 0))
> +       node = of_parse_phandle(dev->of_node, "devfreq", 0);
> +       if (node) {
> +               of_node_put(node);
>                 goto passive;
> -       else
> +       } else {
>                 ret = exynos_bus_parent_parse_of(np, bus);
> +       }
>
>         if (ret < 0)
>                 goto err;

Acked-by: Chanwoo Choi <cw00.choi@samsung.com>

Regards,
Chanwoo Choi

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 7/7] devfreq: exynos-bus: add missing of_node_put after calling of_parse_phandle
@ 2016-07-02  4:53     ` Chanwoo Choi
  0 siblings, 0 replies; 58+ messages in thread
From: Chanwoo Choi @ 2016-07-02  4:53 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Peter,

2016-07-01 18:42 GMT+09:00 Peter Chen <peter.chen@nxp.com>:
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>
> Cc: Chanwoo Choi <cw00.choi@samsung.com>
> Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
> ---
>  drivers/devfreq/exynos-bus.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
> index 2363d0a..a38b5ec 100644
> --- a/drivers/devfreq/exynos-bus.c
> +++ b/drivers/devfreq/exynos-bus.c
> @@ -383,7 +383,7 @@ err_clk:
>  static int exynos_bus_probe(struct platform_device *pdev)
>  {
>         struct device *dev = &pdev->dev;
> -       struct device_node *np = dev->of_node;
> +       struct device_node *np = dev->of_node, node;
>         struct devfreq_dev_profile *profile;
>         struct devfreq_simple_ondemand_data *ondemand_data;
>         struct devfreq_passive_data *passive_data;
> @@ -415,10 +415,13 @@ static int exynos_bus_probe(struct platform_device *pdev)
>                 goto err;
>         }
>
> -       if (of_parse_phandle(dev->of_node, "devfreq", 0))
> +       node = of_parse_phandle(dev->of_node, "devfreq", 0);
> +       if (node) {
> +               of_node_put(node);
>                 goto passive;
> -       else
> +       } else {
>                 ret = exynos_bus_parent_parse_of(np, bus);
> +       }
>
>         if (ret < 0)
>                 goto err;

Acked-by: Chanwoo Choi <cw00.choi@samsung.com>

Regards,
Chanwoo Choi

^ permalink raw reply	[flat|nested] 58+ messages in thread

* RE: [PATCH 2/7] arm: mach-shmobile: pm-rmobile: add missing of_node_put after calling of_parse_phandle
  2016-07-01 12:31     ` Geert Uytterhoeven
  (?)
  (?)
@ 2016-07-04  2:10       ` Peter Chen
  -1 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-04  2:10 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Linux-Renesas, linux-arm-kernel, linux-kernel, Linux PM list,
	linux-samsung-soc, Simon Horman, Magnus Damm

 
>On Fri, Jul 1, 2016 at 11:41 AM, Peter Chen <peter.chen@nxp.com> wrote:
>> of_node_put needs to be called when the device node which is got from
>> of_parse_phandle has finished using.
>>
>> Cc: Simon Horman <horms@verge.net.au>
>> Cc: Magnus Damm <magnus.damm@gmail.com>
>> Signed-off-by: Peter Chen <peter.chen@nxp.com>
>
>NAKed-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
>> --- a/arch/arm/mach-shmobile/pm-rmobile.c
>> +++ b/arch/arm/mach-shmobile/pm-rmobile.c
>> @@ -209,6 +209,7 @@ static void __init add_special_pd(struct device_node *np,
>enum pd_types type)
>>         special_pds[num_special_pds].pd = pd;
>
>The pd pointer is stored in the line above, and released later in put_special_pds().
>
>>         special_pds[num_special_pds].type = type;
>>         num_special_pds++;
>> +       of_node_put(pd);
>
>Hence it must not be released here, as that would cause a double release when
>put_special_pds() is executed.
>

Thanks, Geert, it is my careless.

Please forget this patch.

Peter

^ permalink raw reply	[flat|nested] 58+ messages in thread

* RE: [PATCH 2/7] arm: mach-shmobile: pm-rmobile: add missing of_node_put after calling of_parse_phandle
@ 2016-07-04  2:10       ` Peter Chen
  0 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-04  2:10 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Linux-Renesas, linux-arm-kernel, linux-kernel, Linux PM list,
	linux-samsung-soc, Simon Horman, Magnus Damm

 
>On Fri, Jul 1, 2016 at 11:41 AM, Peter Chen <peter.chen@nxp.com> wrote:
>> of_node_put needs to be called when the device node which is got from
>> of_parse_phandle has finished using.
>>
>> Cc: Simon Horman <horms@verge.net.au>
>> Cc: Magnus Damm <magnus.damm@gmail.com>
>> Signed-off-by: Peter Chen <peter.chen@nxp.com>
>
>NAKed-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
>> --- a/arch/arm/mach-shmobile/pm-rmobile.c
>> +++ b/arch/arm/mach-shmobile/pm-rmobile.c
>> @@ -209,6 +209,7 @@ static void __init add_special_pd(struct device_node *np,
>enum pd_types type)
>>         special_pds[num_special_pds].pd = pd;
>
>The pd pointer is stored in the line above, and released later in put_special_pds().
>
>>         special_pds[num_special_pds].type = type;
>>         num_special_pds++;
>> +       of_node_put(pd);
>
>Hence it must not be released here, as that would cause a double release when
>put_special_pds() is executed.
>

Thanks, Geert, it is my careless.

Please forget this patch.

Peter

^ permalink raw reply	[flat|nested] 58+ messages in thread

* RE: [PATCH 2/7] arm: mach-shmobile: pm-rmobile: add missing of_node_put after calling of_parse_phandle
@ 2016-07-04  2:10       ` Peter Chen
  0 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-04  2:10 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: linux-samsung-soc, Linux PM list, Magnus Damm, linux-kernel,
	Linux-Renesas, Simon Horman, linux-arm-kernel

 
>On Fri, Jul 1, 2016 at 11:41 AM, Peter Chen <peter.chen@nxp.com> wrote:
>> of_node_put needs to be called when the device node which is got from
>> of_parse_phandle has finished using.
>>
>> Cc: Simon Horman <horms@verge.net.au>
>> Cc: Magnus Damm <magnus.damm@gmail.com>
>> Signed-off-by: Peter Chen <peter.chen@nxp.com>
>
>NAKed-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
>> --- a/arch/arm/mach-shmobile/pm-rmobile.c
>> +++ b/arch/arm/mach-shmobile/pm-rmobile.c
>> @@ -209,6 +209,7 @@ static void __init add_special_pd(struct device_node *np,
>enum pd_types type)
>>         special_pds[num_special_pds].pd = pd;
>
>The pd pointer is stored in the line above, and released later in put_special_pds().
>
>>         special_pds[num_special_pds].type = type;
>>         num_special_pds++;
>> +       of_node_put(pd);
>
>Hence it must not be released here, as that would cause a double release when
>put_special_pds() is executed.
>

Thanks, Geert, it is my careless.

Please forget this patch.

Peter

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 2/7] arm: mach-shmobile: pm-rmobile: add missing of_node_put after calling of_parse_phandle
@ 2016-07-04  2:10       ` Peter Chen
  0 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-04  2:10 UTC (permalink / raw)
  To: linux-arm-kernel

 
>On Fri, Jul 1, 2016 at 11:41 AM, Peter Chen <peter.chen@nxp.com> wrote:
>> of_node_put needs to be called when the device node which is got from
>> of_parse_phandle has finished using.
>>
>> Cc: Simon Horman <horms@verge.net.au>
>> Cc: Magnus Damm <magnus.damm@gmail.com>
>> Signed-off-by: Peter Chen <peter.chen@nxp.com>
>
>NAKed-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
>> --- a/arch/arm/mach-shmobile/pm-rmobile.c
>> +++ b/arch/arm/mach-shmobile/pm-rmobile.c
>> @@ -209,6 +209,7 @@ static void __init add_special_pd(struct device_node *np,
>enum pd_types type)
>>         special_pds[num_special_pds].pd = pd;
>
>The pd pointer is stored in the line above, and released later in put_special_pds().
>
>>         special_pds[num_special_pds].type = type;
>>         num_special_pds++;
>> +       of_node_put(pd);
>
>Hence it must not be released here, as that would cause a double release when
>put_special_pds() is executed.
>

Thanks, Geert, it is my careless.

Please forget this patch.

Peter

^ permalink raw reply	[flat|nested] 58+ messages in thread

* RE: [PATCH 4/7] bus: arm-cci: add missing of_node_put after calling of_parse_phandle
  2016-07-01 10:33       ` Will Deacon
  (?)
  (?)
@ 2016-07-04  2:48         ` Peter Chen
  -1 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-04  2:48 UTC (permalink / raw)
  To: Will Deacon, Suzuki K Poulose
  Cc: linux-renesas-soc, linux-arm-kernel, linux-kernel, linux-pm,
	linux-samsung-soc, Sudeep Holla

 
>
>On Fri, Jul 01, 2016 at 11:29:58AM +0100, Suzuki K Poulose wrote:
>> On 01/07/16 10:41, Peter Chen wrote:
>> >of_node_put needs to be called when the device node which is got from
>> >of_parse_phandle has finished using.
>> >
>> >Cc: Will Deacon <will.deacon@arm.com>
>> >Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
>> >Signed-off-by: Peter Chen <peter.chen@nxp.com>
>>
>> Thanks for the fix.
>>
>> >---
>> >  drivers/bus/arm-cci.c | 5 ++++-
>> >  1 file changed, 4 insertions(+), 1 deletion(-)
>> >
>> >diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c index
>> >a49b283..e7b0b8c 100644
>> >--- a/drivers/bus/arm-cci.c
>> >+++ b/drivers/bus/arm-cci.c
>> >@@ -1912,9 +1912,12 @@ static int __cci_ace_get_port(struct device_node *dn,
>int type)
>> >  	cci_portn = of_parse_phandle(dn, "cci-control-port", 0);
>> >  	for (i = 0; i < nb_cci_ports; i++) {
>> >  		ace_match = ports[i].type == type;
>> >-		if (ace_match && cci_portn == ports[i].dn)
>> >+		if (ace_match && cci_portn == ports[i].dn) {
>> >+			of_node_put(cci_portn);
>> >  			return i;
>> >+		}
>> >  	}
>> >+	of_node_put(cci_portn);
>>
>> nit: Could we please do some thing like this ?
>> 		if (ace_match && cci_portn == ports[i].dn)
>> 			break;
>> 	}
>>
>> 	of_node_put(cci_portn);
>> 	return (i < nb_cci_ports) ? i : -ENODEV ;
>>
>> Either way,
>>
>> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
>
>Please route this via arm-soc once you've addressed Suzuki's comment.
>

Hi Will, how to route patch via arm-soc?

Does it mean sending patch by adding arm@kernel.org at To or Cc list?

Peter

^ permalink raw reply	[flat|nested] 58+ messages in thread

* RE: [PATCH 4/7] bus: arm-cci: add missing of_node_put after calling of_parse_phandle
@ 2016-07-04  2:48         ` Peter Chen
  0 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-04  2:48 UTC (permalink / raw)
  To: Will Deacon, Suzuki K Poulose
  Cc: linux-renesas-soc, linux-arm-kernel, linux-kernel, linux-pm,
	linux-samsung-soc, Sudeep Holla

 
>
>On Fri, Jul 01, 2016 at 11:29:58AM +0100, Suzuki K Poulose wrote:
>> On 01/07/16 10:41, Peter Chen wrote:
>> >of_node_put needs to be called when the device node which is got from
>> >of_parse_phandle has finished using.
>> >
>> >Cc: Will Deacon <will.deacon@arm.com>
>> >Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
>> >Signed-off-by: Peter Chen <peter.chen@nxp.com>
>>
>> Thanks for the fix.
>>
>> >---
>> >  drivers/bus/arm-cci.c | 5 ++++-
>> >  1 file changed, 4 insertions(+), 1 deletion(-)
>> >
>> >diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c index
>> >a49b283..e7b0b8c 100644
>> >--- a/drivers/bus/arm-cci.c
>> >+++ b/drivers/bus/arm-cci.c
>> >@@ -1912,9 +1912,12 @@ static int __cci_ace_get_port(struct device_node *dn,
>int type)
>> >  	cci_portn = of_parse_phandle(dn, "cci-control-port", 0);
>> >  	for (i = 0; i < nb_cci_ports; i++) {
>> >  		ace_match = ports[i].type == type;
>> >-		if (ace_match && cci_portn == ports[i].dn)
>> >+		if (ace_match && cci_portn == ports[i].dn) {
>> >+			of_node_put(cci_portn);
>> >  			return i;
>> >+		}
>> >  	}
>> >+	of_node_put(cci_portn);
>>
>> nit: Could we please do some thing like this ?
>> 		if (ace_match && cci_portn == ports[i].dn)
>> 			break;
>> 	}
>>
>> 	of_node_put(cci_portn);
>> 	return (i < nb_cci_ports) ? i : -ENODEV ;
>>
>> Either way,
>>
>> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
>
>Please route this via arm-soc once you've addressed Suzuki's comment.
>

Hi Will, how to route patch via arm-soc?

Does it mean sending patch by adding arm@kernel.org at To or Cc list?

Peter

^ permalink raw reply	[flat|nested] 58+ messages in thread

* RE: [PATCH 4/7] bus: arm-cci: add missing of_node_put after calling of_parse_phandle
@ 2016-07-04  2:48         ` Peter Chen
  0 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-04  2:48 UTC (permalink / raw)
  To: Will Deacon, Suzuki K Poulose
  Cc: linux-samsung-soc, linux-pm, linux-kernel, linux-renesas-soc,
	Sudeep Holla, linux-arm-kernel

 
>
>On Fri, Jul 01, 2016 at 11:29:58AM +0100, Suzuki K Poulose wrote:
>> On 01/07/16 10:41, Peter Chen wrote:
>> >of_node_put needs to be called when the device node which is got from
>> >of_parse_phandle has finished using.
>> >
>> >Cc: Will Deacon <will.deacon@arm.com>
>> >Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
>> >Signed-off-by: Peter Chen <peter.chen@nxp.com>
>>
>> Thanks for the fix.
>>
>> >---
>> >  drivers/bus/arm-cci.c | 5 ++++-
>> >  1 file changed, 4 insertions(+), 1 deletion(-)
>> >
>> >diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c index
>> >a49b283..e7b0b8c 100644
>> >--- a/drivers/bus/arm-cci.c
>> >+++ b/drivers/bus/arm-cci.c
>> >@@ -1912,9 +1912,12 @@ static int __cci_ace_get_port(struct device_node *dn,
>int type)
>> >  	cci_portn = of_parse_phandle(dn, "cci-control-port", 0);
>> >  	for (i = 0; i < nb_cci_ports; i++) {
>> >  		ace_match = ports[i].type == type;
>> >-		if (ace_match && cci_portn == ports[i].dn)
>> >+		if (ace_match && cci_portn == ports[i].dn) {
>> >+			of_node_put(cci_portn);
>> >  			return i;
>> >+		}
>> >  	}
>> >+	of_node_put(cci_portn);
>>
>> nit: Could we please do some thing like this ?
>> 		if (ace_match && cci_portn == ports[i].dn)
>> 			break;
>> 	}
>>
>> 	of_node_put(cci_portn);
>> 	return (i < nb_cci_ports) ? i : -ENODEV ;
>>
>> Either way,
>>
>> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
>
>Please route this via arm-soc once you've addressed Suzuki's comment.
>

Hi Will, how to route patch via arm-soc?

Does it mean sending patch by adding arm@kernel.org at To or Cc list?

Peter

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 4/7] bus: arm-cci: add missing of_node_put after calling of_parse_phandle
@ 2016-07-04  2:48         ` Peter Chen
  0 siblings, 0 replies; 58+ messages in thread
From: Peter Chen @ 2016-07-04  2:48 UTC (permalink / raw)
  To: linux-arm-kernel

 
>
>On Fri, Jul 01, 2016 at 11:29:58AM +0100, Suzuki K Poulose wrote:
>> On 01/07/16 10:41, Peter Chen wrote:
>> >of_node_put needs to be called when the device node which is got from
>> >of_parse_phandle has finished using.
>> >
>> >Cc: Will Deacon <will.deacon@arm.com>
>> >Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
>> >Signed-off-by: Peter Chen <peter.chen@nxp.com>
>>
>> Thanks for the fix.
>>
>> >---
>> >  drivers/bus/arm-cci.c | 5 ++++-
>> >  1 file changed, 4 insertions(+), 1 deletion(-)
>> >
>> >diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c index
>> >a49b283..e7b0b8c 100644
>> >--- a/drivers/bus/arm-cci.c
>> >+++ b/drivers/bus/arm-cci.c
>> >@@ -1912,9 +1912,12 @@ static int __cci_ace_get_port(struct device_node *dn,
>int type)
>> >  	cci_portn = of_parse_phandle(dn, "cci-control-port", 0);
>> >  	for (i = 0; i < nb_cci_ports; i++) {
>> >  		ace_match = ports[i].type == type;
>> >-		if (ace_match && cci_portn == ports[i].dn)
>> >+		if (ace_match && cci_portn == ports[i].dn) {
>> >+			of_node_put(cci_portn);
>> >  			return i;
>> >+		}
>> >  	}
>> >+	of_node_put(cci_portn);
>>
>> nit: Could we please do some thing like this ?
>> 		if (ace_match && cci_portn == ports[i].dn)
>> 			break;
>> 	}
>>
>> 	of_node_put(cci_portn);
>> 	return (i < nb_cci_ports) ? i : -ENODEV ;
>>
>> Either way,
>>
>> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
>
>Please route this via arm-soc once you've addressed Suzuki's comment.
>

Hi Will, how to route patch via arm-soc?

Does it mean sending patch by adding arm at kernel.org at To or Cc list?

Peter

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 4/7] bus: arm-cci: add missing of_node_put after calling of_parse_phandle
  2016-07-04  2:48         ` Peter Chen
  (?)
@ 2016-07-04  9:19           ` Will Deacon
  -1 siblings, 0 replies; 58+ messages in thread
From: Will Deacon @ 2016-07-04  9:19 UTC (permalink / raw)
  To: Peter Chen
  Cc: Suzuki K Poulose, linux-samsung-soc, linux-pm, linux-kernel,
	linux-renesas-soc, Sudeep Holla, linux-arm-kernel

On Mon, Jul 04, 2016 at 02:48:08AM +0000, Peter Chen wrote:
> >Please route this via arm-soc once you've addressed Suzuki's comment.
> 
> Hi Will, how to route patch via arm-soc?
> 
> Does it mean sending patch by adding arm@kernel.org at To or Cc list?

Yes. I just wanted to make it clear that I don't intend to pick this up
(since I'd just send it to arm-soc anyway!).

Will

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 4/7] bus: arm-cci: add missing of_node_put after calling of_parse_phandle
@ 2016-07-04  9:19           ` Will Deacon
  0 siblings, 0 replies; 58+ messages in thread
From: Will Deacon @ 2016-07-04  9:19 UTC (permalink / raw)
  To: Peter Chen
  Cc: Suzuki K Poulose, linux-samsung-soc, linux-pm, linux-kernel,
	linux-renesas-soc, Sudeep Holla, linux-arm-kernel

On Mon, Jul 04, 2016 at 02:48:08AM +0000, Peter Chen wrote:
> >Please route this via arm-soc once you've addressed Suzuki's comment.
> 
> Hi Will, how to route patch via arm-soc?
> 
> Does it mean sending patch by adding arm@kernel.org at To or Cc list?

Yes. I just wanted to make it clear that I don't intend to pick this up
(since I'd just send it to arm-soc anyway!).

Will

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 4/7] bus: arm-cci: add missing of_node_put after calling of_parse_phandle
@ 2016-07-04  9:19           ` Will Deacon
  0 siblings, 0 replies; 58+ messages in thread
From: Will Deacon @ 2016-07-04  9:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jul 04, 2016 at 02:48:08AM +0000, Peter Chen wrote:
> >Please route this via arm-soc once you've addressed Suzuki's comment.
> 
> Hi Will, how to route patch via arm-soc?
> 
> Does it mean sending patch by adding arm at kernel.org at To or Cc list?

Yes. I just wanted to make it clear that I don't intend to pick this up
(since I'd just send it to arm-soc anyway!).

Will

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 3/7] arm: mach-u300: regulator: add missing of_node_put after calling of_parse_phandle
  2016-07-01  9:41   ` Peter Chen
  (?)
@ 2016-07-05 21:24     ` Linus Walleij
  -1 siblings, 0 replies; 58+ messages in thread
From: Linus Walleij @ 2016-07-05 21:24 UTC (permalink / raw)
  To: Peter Chen
  Cc: Linux-Renesas, linux-arm-kernel, linux-kernel, linux-pm,
	linux-samsung-soc

On Fri, Jul 1, 2016 at 11:41 AM, Peter Chen <peter.chen@nxp.com> wrote:

> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 3/7] arm: mach-u300: regulator: add missing of_node_put after calling of_parse_phandle
@ 2016-07-05 21:24     ` Linus Walleij
  0 siblings, 0 replies; 58+ messages in thread
From: Linus Walleij @ 2016-07-05 21:24 UTC (permalink / raw)
  To: Peter Chen
  Cc: Linux-Renesas, linux-arm-kernel, linux-kernel, linux-pm,
	linux-samsung-soc

On Fri, Jul 1, 2016 at 11:41 AM, Peter Chen <peter.chen@nxp.com> wrote:

> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 3/7] arm: mach-u300: regulator: add missing of_node_put after calling of_parse_phandle
@ 2016-07-05 21:24     ` Linus Walleij
  0 siblings, 0 replies; 58+ messages in thread
From: Linus Walleij @ 2016-07-05 21:24 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jul 1, 2016 at 11:41 AM, Peter Chen <peter.chen@nxp.com> wrote:

> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 58+ messages in thread

* RE: [PATCH 6/7] devfreq: add missing of_node_put after calling of_parse_phandle
       [not found] ` <CGME20160701094923epcas1p164cc8773ec44a00dfc506a6192df3409@epcas1p1.samsung.com>
@ 2016-07-06  2:38     ` MyungJoo Ham
  0 siblings, 0 replies; 58+ messages in thread
From: MyungJoo Ham @ 2016-07-06  2:38 UTC (permalink / raw)
  To: Peter Chen, linux-renesas-soc, linux-arm-kernel, linux-kernel,
	linux-pm, linux-samsung-soc
  Cc: Kyungmin Park

[-- Attachment #1: Type: text/plain, Size: 554 bytes --]

> --------- Original Message ---------
> Sender : Peter Chen <peter.chen@nxp.com>
> Date   : 2016-07-01 18:49 (GMT+9)
> Title  : [PATCH 6/7] devfreq: add missing of_node_put after calling of_parse_phandle
>  
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>  
> Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>

Thank you!


Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>


^ permalink raw reply	[flat|nested] 58+ messages in thread

* RE: [PATCH 6/7] devfreq: add missing of_node_put after calling of_parse_phandle
@ 2016-07-06  2:38     ` MyungJoo Ham
  0 siblings, 0 replies; 58+ messages in thread
From: MyungJoo Ham @ 2016-07-06  2:38 UTC (permalink / raw)
  To: linux-arm-kernel

> --------- Original Message ---------
> Sender : Peter Chen <peter.chen@nxp.com>
> Date   : 2016-07-01 18:49 (GMT+9)
> Title  : [PATCH 6/7] devfreq: add missing of_node_put after calling of_parse_phandle
>  
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>  
> Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>

Thank you!


Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>

^ permalink raw reply	[flat|nested] 58+ messages in thread

* RE: [PATCH 7/7] devfreq: exynos-bus: add missing of_node_put after calling of_parse_phandle
       [not found] ` <CGME20160701094927epcas1p43f956ee3465f96e2f9c99b44c0f5b49d@epcas1p4.samsung.com>
@ 2016-07-06  2:47     ` MyungJoo Ham
  0 siblings, 0 replies; 58+ messages in thread
From: MyungJoo Ham @ 2016-07-06  2:47 UTC (permalink / raw)
  To: Peter Chen, linux-renesas-soc, linux-arm-kernel, linux-kernel,
	linux-pm, linux-samsung-soc
  Cc: Chanwoo Choi, Kyungmin Park, Kukjin Kim, Krzysztof Kozlowski

[-- Attachment #1: Type: text/plain, Size: 1559 bytes --]

> 
> --------- Original Message ---------
> Sender : Peter Chen <peter.chen@nxp.com>
> Date   : 2016-07-01 18:49 (GMT+9)
> Title  : [PATCH 7/7] devfreq: exynos-bus: add missing of_node_put after calling of_parse_phandle
>  
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>  
> Cc: Chanwoo Choi <cw00.choi@samsung.com>
> Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>

With the change (build error fix) of the following added, (I'll update)
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>


Cheers,
MyungJoo

> ---
>  drivers/devfreq/exynos-bus.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>  
> diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
> index 2363d0a..a38b5ec 100644
> --- a/drivers/devfreq/exynos-bus.c
> +++ b/drivers/devfreq/exynos-bus.c
> @@ -383,7 +383,7 @@ err_clk:
>  static int exynos_bus_probe(struct platform_device *pdev)
>  {
>          struct device *dev = &pdev->dev;
> -        struct device_node *np = dev->of_node;
> +        struct device_node *np = dev->of_node, node;

+	struct device_node *np = dev->of_node, *node;

>          struct devfreq_dev_profile *profile;
>          struct devfreq_simple_ondemand_data *ondemand_data;
>          struct devfreq_passive_data *passive_data;
...

^ permalink raw reply	[flat|nested] 58+ messages in thread

* RE: [PATCH 7/7] devfreq: exynos-bus: add missing of_node_put after calling of_parse_phandle
@ 2016-07-06  2:47     ` MyungJoo Ham
  0 siblings, 0 replies; 58+ messages in thread
From: MyungJoo Ham @ 2016-07-06  2:47 UTC (permalink / raw)
  To: linux-arm-kernel

> 
> --------- Original Message ---------
> Sender : Peter Chen <peter.chen@nxp.com>
> Date   : 2016-07-01 18:49 (GMT+9)
> Title  : [PATCH 7/7] devfreq: exynos-bus: add missing of_node_put after calling of_parse_phandle
>  
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
>  
> Cc: Chanwoo Choi <cw00.choi@samsung.com>
> Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>

With the change (build error fix) of the following added, (I'll update)
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>


Cheers,
MyungJoo

> ---
>  drivers/devfreq/exynos-bus.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>  
> diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
> index 2363d0a..a38b5ec 100644
> --- a/drivers/devfreq/exynos-bus.c
> +++ b/drivers/devfreq/exynos-bus.c
> @@ -383,7 +383,7 @@ err_clk:
>  static int exynos_bus_probe(struct platform_device *pdev)
>  {
>          struct device *dev = &pdev->dev;
> -        struct device_node *np = dev->of_node;
> +        struct device_node *np = dev->of_node, node;

+	struct device_node *np = dev->of_node, *node;

>          struct devfreq_dev_profile *profile;
>          struct devfreq_simple_ondemand_data *ondemand_data;
>          struct devfreq_passive_data *passive_data;
...

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 5/7] bus: vexpress-config: add missing of_node_put after calling of_parse_phandle
  2016-07-01  9:41   ` Peter Chen
@ 2016-07-11  9:02     ` Liviu Dudau
  -1 siblings, 0 replies; 58+ messages in thread
From: Liviu Dudau @ 2016-07-11  9:02 UTC (permalink / raw)
  To: Peter Chen
  Cc: linux-renesas-soc, linux-arm-kernel, linux-kernel, linux-pm,
	linux-samsung-soc, Lorenzo Pieralisi, Sudeep Holla

On Fri, Jul 01, 2016 at 05:41:59PM +0800, Peter Chen wrote:
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
> 
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Sudeep Holla <sudeep.holla@arm.com>
> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>

Acked-by: Liviu Dudau <Liviu.Dudau@arm.com>

> ---
>  drivers/bus/vexpress-config.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/bus/vexpress-config.c b/drivers/bus/vexpress-config.c
> index c3cb76b..9efdf1d 100644
> --- a/drivers/bus/vexpress-config.c
> +++ b/drivers/bus/vexpress-config.c
> @@ -178,6 +178,7 @@ static int vexpress_config_populate(struct device_node *node)
>  
>  	parent = class_find_device(vexpress_config_class, NULL, bridge,
>  			vexpress_config_node_match);
> +	of_node_put(bridge);
>  	if (WARN_ON(!parent))
>  		return -ENODEV;
>  
> -- 
> 1.9.1
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 5/7] bus: vexpress-config: add missing of_node_put after calling of_parse_phandle
@ 2016-07-11  9:02     ` Liviu Dudau
  0 siblings, 0 replies; 58+ messages in thread
From: Liviu Dudau @ 2016-07-11  9:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jul 01, 2016 at 05:41:59PM +0800, Peter Chen wrote:
> of_node_put needs to be called when the device node which is got
> from of_parse_phandle has finished using.
> 
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Sudeep Holla <sudeep.holla@arm.com>
> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Signed-off-by: Peter Chen <peter.chen@nxp.com>

Acked-by: Liviu Dudau <Liviu.Dudau@arm.com>

> ---
>  drivers/bus/vexpress-config.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/bus/vexpress-config.c b/drivers/bus/vexpress-config.c
> index c3cb76b..9efdf1d 100644
> --- a/drivers/bus/vexpress-config.c
> +++ b/drivers/bus/vexpress-config.c
> @@ -178,6 +178,7 @@ static int vexpress_config_populate(struct device_node *node)
>  
>  	parent = class_find_device(vexpress_config_class, NULL, bridge,
>  			vexpress_config_node_match);
> +	of_node_put(bridge);
>  	if (WARN_ON(!parent))
>  		return -ENODEV;
>  
> -- 
> 1.9.1
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ?\_(?)_/?

^ permalink raw reply	[flat|nested] 58+ messages in thread

end of thread, other threads:[~2016-07-11  9:02 UTC | newest]

Thread overview: 58+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-01  9:41 [PATCH 0/7] add missing of_node_put after calling of_parse_phandle (1st) Peter Chen
2016-07-01  9:41 ` Peter Chen
2016-07-01  9:41 ` [PATCH 1/7] extcon: add missing of_node_put after calling of_parse_phandle Peter Chen
2016-07-01  9:41   ` Peter Chen
2016-07-01  9:41   ` Peter Chen
2016-07-02  4:46   ` Chanwoo Choi
2016-07-02  4:46     ` Chanwoo Choi
2016-07-02  4:46     ` Chanwoo Choi
2016-07-01  9:41 ` [PATCH 2/7] arm: mach-shmobile: pm-rmobile: " Peter Chen
2016-07-01  9:41   ` Peter Chen
2016-07-01  9:41   ` Peter Chen
2016-07-01 12:31   ` Geert Uytterhoeven
2016-07-01 12:31     ` Geert Uytterhoeven
2016-07-01 12:31     ` Geert Uytterhoeven
2016-07-04  2:10     ` Peter Chen
2016-07-04  2:10       ` Peter Chen
2016-07-04  2:10       ` Peter Chen
2016-07-04  2:10       ` Peter Chen
2016-07-01  9:41 ` [PATCH 3/7] arm: mach-u300: regulator: " Peter Chen
2016-07-01  9:41 ` Peter Chen
2016-07-01  9:41   ` Peter Chen
2016-07-05 21:24   ` Linus Walleij
2016-07-05 21:24     ` Linus Walleij
2016-07-05 21:24     ` Linus Walleij
2016-07-01  9:41 ` Peter Chen
2016-07-01  9:41 ` Peter Chen
2016-07-01  9:41 ` Peter Chen
2016-07-01  9:41 ` [PATCH 4/7] bus: arm-cci: " Peter Chen
2016-07-01  9:41   ` Peter Chen
2016-07-01  9:41   ` Peter Chen
2016-07-01 10:29   ` Suzuki K Poulose
2016-07-01 10:29     ` Suzuki K Poulose
2016-07-01 10:33     ` Will Deacon
2016-07-01 10:33       ` Will Deacon
2016-07-04  2:48       ` Peter Chen
2016-07-04  2:48         ` Peter Chen
2016-07-04  2:48         ` Peter Chen
2016-07-04  2:48         ` Peter Chen
2016-07-04  9:19         ` Will Deacon
2016-07-04  9:19           ` Will Deacon
2016-07-04  9:19           ` Will Deacon
2016-07-01  9:41 ` [PATCH 5/7] bus: vexpress-config: " Peter Chen
2016-07-01  9:41   ` Peter Chen
2016-07-01  9:41   ` Peter Chen
2016-07-11  9:02   ` Liviu Dudau
2016-07-11  9:02     ` Liviu Dudau
2016-07-01  9:42 ` [PATCH 6/7] devfreq: " Peter Chen
2016-07-01  9:42   ` Peter Chen
2016-07-01  9:42   ` Peter Chen
2016-07-01  9:42 ` [PATCH 7/7] devfreq: exynos-bus: " Peter Chen
2016-07-01  9:42   ` Peter Chen
2016-07-01  9:42   ` Peter Chen
2016-07-02  4:53   ` Chanwoo Choi
2016-07-02  4:53     ` Chanwoo Choi
     [not found] ` <CGME20160701094923epcas1p164cc8773ec44a00dfc506a6192df3409@epcas1p1.samsung.com>
2016-07-06  2:38   ` [PATCH 6/7] devfreq: " MyungJoo Ham
2016-07-06  2:38     ` MyungJoo Ham
     [not found] ` <CGME20160701094927epcas1p43f956ee3465f96e2f9c99b44c0f5b49d@epcas1p4.samsung.com>
2016-07-06  2:47   ` [PATCH 7/7] devfreq: exynos-bus: " MyungJoo Ham
2016-07-06  2:47     ` MyungJoo Ham

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.