svn commit: r354082 - head/sys/dev/superio
Andriy Gapon
avg at FreeBSD.org
Fri Oct 25 16:30:24 UTC 2019
Author: avg
Date: Fri Oct 25 16:30:24 2019
New Revision: 354082
URL: https://svnweb.freebsd.org/changeset/base/354082
Log:
superio: do not crash if failed to create the character device
MFC after: 1 week
Modified:
head/sys/dev/superio/superio.c
Modified: head/sys/dev/superio/superio.c
==============================================================================
--- head/sys/dev/superio/superio.c Fri Oct 25 16:29:09 2019 (r354081)
+++ head/sys/dev/superio/superio.c Fri Oct 25 16:30:24 2019 (r354082)
@@ -636,7 +636,8 @@ superio_attach(device_t dev)
UID_ROOT, GID_WHEEL, 0600, "superio%d", device_get_unit(dev));
if (sc->chardev == NULL)
device_printf(dev, "failed to create character device\n");
- sc->chardev->si_drv1 = sc;
+ else
+ sc->chardev->si_drv1 = sc;
return (0);
}
More information about the svn-src-all
mailing list