diff options
Diffstat (limited to 'usr/src/uts/common/os/modsysfile.c')
-rw-r--r-- | usr/src/uts/common/os/modsysfile.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr/src/uts/common/os/modsysfile.c b/usr/src/uts/common/os/modsysfile.c index de5c106782..7875824a86 100644 --- a/usr/src/uts/common/os/modsysfile.c +++ b/usr/src/uts/common/os/modsysfile.c @@ -3142,12 +3142,14 @@ process_rtc_config_file(void) static void append(struct hwc_spec *spec, struct par_list *par) { - struct hwc_spec *hwc, *last; + struct hwc_spec *hwc, *last = NULL; ASSERT(par->par_specs); for (hwc = par->par_specs; hwc; hwc = hwc->hwc_next) last = hwc; - last->hwc_next = spec; + + if (last != NULL) + last->hwc_next = spec; } /* |