From: Antony Pavlov <antonynpavlov@gmail.com>
To: barebox@lists.infradead.org, Sascha Hauer <s.hauer@pengutronix.de>
Subject: [PATCH for master 2/2] pci_of_match_device: don't crash on MIPS Malta
Date: Thu, 13 Sep 2018 00:00:06 +0300 [thread overview]
Message-ID: <20180912210006.28087-3-antonynpavlov@gmail.com> (raw)
In-Reply-To: <20180912210006.28087-1-antonynpavlov@gmail.com>
In arch/mips/mach-malta/pci.c PCI controller is instantiated
without dt and struct pci_controller parent field is NULL.
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
drivers/pci/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index d206c53848..7abc7a3439 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -339,7 +339,7 @@ pci_of_match_device(struct device_d *parent, unsigned int devfn)
struct device_node *np;
u32 reg;
- if (!IS_ENABLED(CONFIG_OFTREE) || !parent->device_node)
+ if (!IS_ENABLED(CONFIG_OFTREE) || !parent || !parent->device_node)
return NULL;
for_each_child_of_node(parent->device_node, np) {
--
2.18.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2018-09-12 21:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-12 21:00 [PATCH for master 0/2] MIPS and PCI-related fixes Antony Pavlov
2018-09-12 21:00 ` [PATCH for master 1/2] MIPS: fix PCI quirk infrastructure build Antony Pavlov
2018-09-12 21:00 ` Antony Pavlov [this message]
2018-09-17 7:32 ` [PATCH for master 0/2] MIPS and PCI-related fixes Sascha Hauer
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=20180912210006.28087-3-antonynpavlov@gmail.com \
--to=antonynpavlov@gmail.com \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/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