linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: santosh.shilimkar@oracle.com (santosh shilimkar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] clocksource/drivers/keystone: Fix bad NO_IRQ usage
Date: Wed, 30 Sep 2015 08:26:23 -0700	[thread overview]
Message-ID: <560BFF1F.6000201@oracle.com> (raw)
In-Reply-To: <1443607710-10415-2-git-send-email-daniel.lezcano@linaro.org>

On 9/30/2015 3:08 AM, Daniel Lezcano wrote:
> The current code assumes the 'irq_of_parse_and_map' will return NO_IRQ in case
> of failure. Unfortunately, the NO_IRQ is not consistent across the different
> architectures and we must not rely on it.
>
> NO_IRQ is equal to '-1' on ARM and 'irq_of_parse_and_map' returns '0' in case
> of an error. Hence, the latter won't be detected and will lead to a crash.
>
> Fix this by just checking 'irq' is different from zero.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
>   drivers/clocksource/timer-keystone.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
Acked-by: Santosh Shilimkar <ssantosh@kernel.org>

  reply	other threads:[~2015-09-30 15:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-30 10:07 [GIT PULL] clockevents: a couple of fixes 4.3 Daniel Lezcano
2015-09-30 10:08 ` [PATCH 1/2] clocksource/drivers/rockchip: Fix bad NO_IRQ usage Daniel Lezcano
2015-09-30 10:08   ` [PATCH 2/2] clocksource/drivers/keystone: " Daniel Lezcano
2015-09-30 15:26     ` santosh shilimkar [this message]
2015-09-30 10:17   ` [PATCH 1/2] clocksource/drivers/rockchip: " Caesar Wang

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=560BFF1F.6000201@oracle.com \
    --to=santosh.shilimkar@oracle.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;
as well as URLs for NNTP newsgroup(s).