mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-04 09:09:56 +00: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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=354082
@ -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