From: walter harms <wharms@bfs.de>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/2] ARM: davinci: PM: Do not free useful resources in normal path in 'davinci_pm_init'
Date: Sat, 13 May 2017 13:22:25 +0000 [thread overview]
Message-ID: <59170891.4010307@bfs.de> (raw)
In-Reply-To: <20170513114020.23668-1-christophe.jaillet@wanadoo.fr>
Am 13.05.2017 13:40, schrieb Christophe JAILLET:
> 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);
looks like, but that would mean that is wrong also:
davinci_sram_suspend = sram_alloc(davinci_cpu_suspend_sz, NULL);
if (!davinci_sram_suspend) {
pr_err("PM: cannot allocate SRAM memory\n");
return -ENOMEM;
}
what means 1 iounmap missing.
re,
wh
WARNING: multiple messages have this Message-ID (diff)
From: wharms@bfs.de (walter harms)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] ARM: davinci: PM: Do not free useful resources in normal path in 'davinci_pm_init'
Date: Sat, 13 May 2017 15:22:25 +0200 [thread overview]
Message-ID: <59170891.4010307@bfs.de> (raw)
In-Reply-To: <20170513114020.23668-1-christophe.jaillet@wanadoo.fr>
Am 13.05.2017 13:40, schrieb Christophe JAILLET:
> 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);
looks like, but that would mean that is wrong also:
davinci_sram_suspend = sram_alloc(davinci_cpu_suspend_sz, NULL);
if (!davinci_sram_suspend) {
pr_err("PM: cannot allocate SRAM memory\n");
return -ENOMEM;
}
what means 1 iounmap missing.
re,
wh
WARNING: multiple messages have this Message-ID (diff)
From: walter harms <wharms@bfs.de>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: nsekhar@ti.com, khilman@kernel.org, linux@armlinux.org.uk,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 2/2] ARM: davinci: PM: Do not free useful resources in normal path in 'davinci_pm_init'
Date: Sat, 13 May 2017 15:22:25 +0200 [thread overview]
Message-ID: <59170891.4010307@bfs.de> (raw)
In-Reply-To: <20170513114020.23668-1-christophe.jaillet@wanadoo.fr>
Am 13.05.2017 13:40, schrieb Christophe JAILLET:
> 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);
looks like, but that would mean that is wrong also:
davinci_sram_suspend = sram_alloc(davinci_cpu_suspend_sz, NULL);
if (!davinci_sram_suspend) {
pr_err("PM: cannot allocate SRAM memory\n");
return -ENOMEM;
}
what means 1 iounmap missing.
re,
wh
next prev parent reply other threads:[~2017-05-13 13:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-13 11:40 [PATCH 2/2] ARM: davinci: PM: Do not free useful resources in normal path in 'davinci_pm_init' Christophe JAILLET
2017-05-13 11:40 ` Christophe JAILLET
2017-05-13 11:40 ` Christophe JAILLET
2017-05-13 13:22 ` walter harms [this message]
2017-05-13 13:22 ` walter harms
2017-05-13 13:22 ` walter harms
2017-05-13 16:44 ` Christophe JAILLET
2017-05-13 16:44 ` Christophe JAILLET
2017-05-13 16:44 ` Christophe JAILLET
2017-05-17 10:03 ` Sekhar Nori
2017-05-17 10:15 ` Sekhar Nori
2017-05-17 10:03 ` Sekhar Nori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=59170891.4010307@bfs.de \
--to=wharms@bfs.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.