linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] soc/tegra: pmc: Avoid usage of uninitialized variable
@ 2015-07-09  7:59 Thierry Reding
       [not found] ` <1436428795-32000-1-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Thierry Reding @ 2015-07-09  7:59 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Mikko Perttunen, Nicolas Chauvet,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

Make sure to only drop the reference to the OF node after it's been
successfully obtained.

Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 drivers/soc/tegra/pmc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c
index 1878d4da715d..6b0df8154fa4 100644
--- a/drivers/soc/tegra/pmc.c
+++ b/drivers/soc/tegra/pmc.c
@@ -1043,12 +1043,12 @@ void tegra_pmc_init_tsense_reset(struct tegra_pmc *pmc)
 	u32 value, checksum;
 
 	if (!pmc->soc->has_tsense_reset)
-		goto out;
+		return;
 
 	np = of_find_node_by_name(pmc->dev->of_node, "i2c-thermtrip");
 	if (!np) {
 		dev_warn(dev, "i2c-thermtrip node not found, %s.\n", disabled);
-		goto out;
+		return;
 	}
 
 	if (of_property_read_u32(np, "nvidia,i2c-controller-id", &ctrl_id)) {
-- 
2.4.1

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

* Re: [PATCH] soc/tegra: pmc: Avoid usage of uninitialized variable
       [not found] ` <1436428795-32000-1-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2015-07-09  8:03   ` Mikko Perttunen
  0 siblings, 0 replies; 2+ messages in thread
From: Mikko Perttunen @ 2015-07-09  8:03 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Mikko Perttunen, Nicolas Chauvet,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

Thanks for the fix; sorry for the typo or whatever you can call it :)

This should also go into 4.0 and 4.1.

Cheers,
Mikko.

On 07/09/2015 10:59 AM, Thierry Reding wrote:
> From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> 
> Make sure to only drop the reference to the OF node after it's been
> successfully obtained.
> 
> Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
>  drivers/soc/tegra/pmc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c
> index 1878d4da715d..6b0df8154fa4 100644
> --- a/drivers/soc/tegra/pmc.c
> +++ b/drivers/soc/tegra/pmc.c
> @@ -1043,12 +1043,12 @@ void tegra_pmc_init_tsense_reset(struct tegra_pmc *pmc)
>  	u32 value, checksum;
>  
>  	if (!pmc->soc->has_tsense_reset)
> -		goto out;
> +		return;
>  
>  	np = of_find_node_by_name(pmc->dev->of_node, "i2c-thermtrip");
>  	if (!np) {
>  		dev_warn(dev, "i2c-thermtrip node not found, %s.\n", disabled);
> -		goto out;
> +		return;
>  	}
>  
>  	if (of_property_read_u32(np, "nvidia,i2c-controller-id", &ctrl_id)) {
> 

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

end of thread, other threads:[~2015-07-09  8:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-09  7:59 [PATCH] soc/tegra: pmc: Avoid usage of uninitialized variable Thierry Reding
     [not found] ` <1436428795-32000-1-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-07-09  8:03   ` Mikko Perttunen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).