Module Name: src Committed By: nat Date: Tue Sep 6 02:26:11 UTC 2022
Modified Files: src/sys/dev/usb: udl.c Log Message: Ensure the device is fully initialized before starting the update thread. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/dev/usb/udl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/usb/udl.c diff -u src/sys/dev/usb/udl.c:1.30 src/sys/dev/usb/udl.c:1.31 --- src/sys/dev/usb/udl.c:1.30 Tue Sep 6 02:23:50 2022 +++ src/sys/dev/usb/udl.c Tue Sep 6 02:26:11 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: udl.c,v 1.30 2022/09/06 02:23:50 nat Exp $ */ +/* $NetBSD: udl.c,v 1.31 2022/09/06 02:26:11 nat Exp $ */ /*- * Copyright (c) 2009 FUKAUMI Naoki. @@ -53,7 +53,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: udl.c,v 1.30 2022/09/06 02:23:50 nat Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udl.c,v 1.31 2022/09/06 02:26:11 nat Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -1833,7 +1833,8 @@ udl_update_thread(void *v) kthread_exit(0); } - if (sc->sc_thread_stop == true || sc->sc_fbmem == NULL) + if (sc->sc_thread_stop == true || sc->sc_fbmem == NULL || + sc->sc_fbmem_prev == NULL || sc->sc_width <= 0) goto thread_wait; if (sc->sc_clear == true)