patch-2.1.97 linux/arch/sparc/prom/ranges.c

Next file: linux/arch/sparc/prom/segment.c
Previous file: linux/arch/sparc/prom/mp.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.96/linux/arch/sparc/prom/ranges.c linux/arch/sparc/prom/ranges.c
@@ -1,4 +1,4 @@
-/* $Id: ranges.c,v 1.10 1997/12/19 12:37:18 jj Exp $
+/* $Id: ranges.c,v 1.11 1998/01/30 10:59:05 jj Exp $
  * ranges.c: Handle ranges in newer proms for obio/sbus.
  *
  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
@@ -68,7 +68,7 @@
 void prom_apply_sbus_ranges(struct linux_sbus *sbus, struct linux_prom_registers *regs,
 			    int nregs, struct linux_sbus_device *sdev)
 {
-	if(sbus->num_sbus_ranges) {
+	if(sbus && sbus->num_sbus_ranges) {
 		if(sdev && (sdev->ranges_applied == 0)) {
 			sdev->ranges_applied = 1;
 			prom_adjust_regs(regs, nregs, sbus->sbus_ranges,

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov