superio: do not crash if failed to create the character device
MFC after: 1 week
This commit is contained in:
parent
3f9b3c4810
commit
a95b774891
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user