Don't assume we have a valid bootinfo pointer.

This commit is contained in:
Marcel Moolenaar 2011-05-26 20:47:05 +00:00
parent 3b6bd978f0
commit 7512c508df

View File

@ -166,8 +166,11 @@ bare_timebase_freq(platform_t plat, struct cpuref *cpuref)
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;