mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
superio: do not crash if failed to create the character device
MFC after: 1 week
This commit is contained in:
parent
702828f643
commit
174bd5b040
1 changed files with 2 additions and 1 deletions
|
|
@ -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 a new issue