Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1640886

[PATCH 2/2] ARM: davinci: PM: Do not free useful resources in normal path in 'davinci_pm_init'

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Newsgroups linux.kernel
Subject [PATCH 2/2] ARM: davinci: PM: Do not free useful resources in normal path in 'davinci_pm_init'
Date Sat, 13 May 2017 13:50:02 +0200
Message-ID <tGDIC-35B-15@gated-at.bofh.it> (permalink)
X-Original-To nsekhar@ti.com, khilman@kernel.org, linux@armlinux.org.uk
X-Me-Helo localhost.localdomain
X-Me-Auth Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI=
X-Me-Date Sat, 13 May 2017 13:40:24 +0200
X-Me-IP 92.140.175.66
X-Mailer git-send-email 2.11.0
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 29
Organization linux.* mail to news gateway
X-Original-Cc linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET <christophe.jaillet@wanadoo.fr>
X-Original-Date Sat, 13 May 2017 13:40:20 +0200
X-Original-Message-ID <20170513114020.23668-1-christophe.jaillet@wanadoo.fr>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1640886

Show key headers only | View raw


This looks spurious to iounmap resources in the normal path of this init
function.
The 3 ioremap'ed fields of 'pm_config' can be accessed later on in other
functions, so it is likely that we should return 'success' before unrolling
everything.

Fixes: aa9aa1ec2df6 ("ARM: davinci: PM: rework init, remove platform device")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
This patch is just a *guess*. The end of the function looks more like a
error handling code rather than a normal path.
---
 arch/arm/mach-davinci/pm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-davinci/pm.c b/arch/arm/mach-davinci/pm.c
index d282b0783ecf..163d865abbf9 100644
--- a/arch/arm/mach-davinci/pm.c
+++ b/arch/arm/mach-davinci/pm.c
@@ -161,6 +161,7 @@ int __init davinci_pm_init(void)
 						davinci_cpu_suspend_sz);
 
 	suspend_set_ops(&davinci_pm_ops);
+	return 0;
 
 no_sram_mem:
 	iounmap(pm_config.ddrpsc_reg_base);
-- 
2.11.0

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 2/2] ARM: davinci: PM: Do not free useful resources in normal path in 'davinci_pm_init' Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2017-05-13 13:50 +0200
  Re: [PATCH 2/2] ARM: davinci: PM: Do not free useful resources in  normal path in 'davinci_pm_init' walter harms <wharms@bfs.de> - 2017-05-13 15:30 +0200
    Re: [PATCH 2/2] ARM: davinci: PM: Do not free useful resources in  normal path in 'davinci_pm_init' Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2017-05-13 18:50 +0200
  Re: [PATCH 2/2] ARM: davinci: PM: Do not free useful resources in  normal path in 'davinci_pm_init' Sekhar Nori <nsekhar@ti.com> - 2017-05-17 12:10 +0200

csiph-web