public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: sshtylyov@ru.mvista.com (Sergei Shtylyov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: smp-twd: check for uninitialized clock in twd_cpufreq_init
Date: Sat, 18 Feb 2012 19:56:30 +0400	[thread overview]
Message-ID: <4F3FCA2E.3000804@ru.mvista.com> (raw)
In-Reply-To: <1329474869-32356-1-git-send-email-t-kristo@ti.com>

Hello.

On 17-02-2012 14:34, Tero Kristo wrote:

> Non-smp platforms don't have local timer support, but the twd_cpufreq_init
> only checks for IS_ERR during init. Check against null also, to avoid
> crashes during cpufreq transitions on non-smp platforms.

> Signed-off-by: Tero Kristo <t-kristo@ti.com>
> ---
>   arch/arm/kernel/smp_twd.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)

> diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c
> index 4285daa..dae8902 100644
> --- a/arch/arm/kernel/smp_twd.c
> +++ b/arch/arm/kernel/smp_twd.c
> @@ -129,7 +129,7 @@ static struct notifier_block twd_cpufreq_nb = {
>
>   static int twd_cpufreq_init(void)
>   {
> -	if (!IS_ERR(twd_clk))
> +	if (twd_clk&&  !IS_ERR(twd_clk))

    Why not !IS_ERR_OR_NULL(twd_clk)?

WBR, Sergei

      parent reply	other threads:[~2012-02-18 15:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-17 10:34 [PATCH] arm: smp-twd: check for uninitialized clock in twd_cpufreq_init Tero Kristo
2012-02-17 10:47 ` Shilimkar, Santosh
2012-02-17 11:09   ` Tero Kristo
2012-02-18 15:56 ` Sergei Shtylyov [this message]

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=4F3FCA2E.3000804@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox