Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4209ab098c61b1a9684bb4d3fc287352fc2438c3
Commit:     4209ab098c61b1a9684bb4d3fc287352fc2438c3
Parent:     719023fb90009855c4515a16349fc6d0a2f93a74
Author:     David S. Miller <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 15 20:45:32 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Oct 17 16:25:10 2007 -0700

    [SPARC64]: Check of_get_property() return in pci_determine_mem_io_space().
    
    If the PCI controller lacks the 'ranges' property nothing
    is going to work.
    
    Noticed by Al Viro.
    
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 arch/sparc64/kernel/pci_common.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/sparc64/kernel/pci_common.c b/arch/sparc64/kernel/pci_common.c
index c76bfbb..923e0bc 100644
--- a/arch/sparc64/kernel/pci_common.c
+++ b/arch/sparc64/kernel/pci_common.c
@@ -396,6 +396,13 @@ void pci_determine_mem_io_space(struct pci_pbm_info *pbm)
 
        saw_mem = saw_io = 0;
        pbm_ranges = of_get_property(pbm->prom_node, "ranges", &i);
+       if (!pbm_ranges) {
+               prom_printf("PCI: Fatal error, missing PBM ranges property "
+                           " for %s\n",
+                           pbm->name);
+               prom_halt();
+       }
+
        num_pbm_ranges = i / sizeof(*pbm_ranges);
 
        for (i = 0; i < num_pbm_ranges; i++) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to