Author: marcel
Date: Thu May 26 20:47:05 2011
New Revision: 222327
URL: http://svn.freebsd.org/changeset/base/222327

Log:
  Don't assume we have a valid bootinfo pointer.

Modified:
  head/sys/powerpc/booke/platform_bare.c

Modified: head/sys/powerpc/booke/platform_bare.c
==============================================================================
--- head/sys/powerpc/booke/platform_bare.c      Thu May 26 20:32:33 2011        
(r222326)
+++ head/sys/powerpc/booke/platform_bare.c      Thu May 26 20:47:05 2011        
(r222327)
@@ -166,8 +166,11 @@ bare_timebase_freq(platform_t plat, stru
        phandle_t cpus, child;
        pcell_t freq;
 
-       /* Backward compatibility. See 8-STABLE. */
-       ticks = bootinfo[3] >> 3;
+       if (bootinfo != NULL) {
+               /* Backward compatibility. See 8-STABLE. */
+               ticks = bootinfo[3] >> 3;
+       } else
+               ticks = 0;
 
        if ((cpus = OF_finddevice("/cpus")) == 0)
                goto out;
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to