All of lore.kernel.org
 help / color / mirror / Atom feed
From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: prima2: return rather than panic on missing DT nodes
Date: Thu, 16 May 2013 10:50:37 -0500	[thread overview]
Message-ID: <1368719437-28287-1-git-send-email-robherring2@gmail.com> (raw)

From: Rob Herring <rob.herring@calxeda.com>

Missing nodes is a normal condition in multi-platform kernels when we boot
on other platforms. So remove the panic and just return if we don't find
a DT node.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Barry Song <baohua.song@csr.com>
---
 arch/arm/mach-prima2/pm.c   | 2 +-
 arch/arm/mach-prima2/rstc.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-prima2/pm.c b/arch/arm/mach-prima2/pm.c
index 9936c18..a8003e2 100644
--- a/arch/arm/mach-prima2/pm.c
+++ b/arch/arm/mach-prima2/pm.c
@@ -102,7 +102,7 @@ static int __init sirfsoc_of_pwrc_init(void)
 
 	np = of_find_matching_node(NULL, pwrc_ids);
 	if (!np)
-		panic("unable to find compatible pwrc node in dtb\n");
+		return -ENODEV;
 
 	/*
 	 * pwrc behind rtciobrg is not located in memory space
diff --git a/arch/arm/mach-prima2/rstc.c b/arch/arm/mach-prima2/rstc.c
index 435019c..6d7d9db 100644
--- a/arch/arm/mach-prima2/rstc.c
+++ b/arch/arm/mach-prima2/rstc.c
@@ -29,7 +29,7 @@ static int __init sirfsoc_of_rstc_init(void)
 
 	np = of_find_matching_node(NULL, rstc_ids);
 	if (!np)
-		panic("unable to find compatible rstc node in dtb\n");
+		return -ENODEV;
 
 	sirfsoc_rstc_base = of_iomap(np, 0);
 	if (!sirfsoc_rstc_base)
-- 
1.8.1.2

             reply	other threads:[~2013-05-16 15:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-16 15:50 Rob Herring [this message]
2013-05-16 17:00 ` [PATCH] ARM: prima2: return rather than panic on missing DT nodes Srinivas KANDAGATLA
2013-05-16 20:18   ` Rob Herring
2013-05-17  0:30     ` Barry Song
2013-05-17  6:35       ` Srinivas KANDAGATLA
2013-05-17  0:31     ` Barry Song

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=1368719437-28287-1-git-send-email-robherring2@gmail.com \
    --to=robherring2@gmail.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 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.