Date: Fri, 25 Oct 2019 16:30:24 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r354082 - head/sys/dev/superio Message-ID: <201910251630.x9PGUOml058793@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910251630.x9PGUOml058793>