If the device driver open call fails, don't set sc_open since in that case
authormglocker <mglocker@openbsd.org>
Wed, 17 Feb 2021 17:09:12 +0000 (17:09 +0000)
committermglocker <mglocker@openbsd.org>
Wed, 17 Feb 2021 17:09:12 +0000 (17:09 +0000)
commit4770bd4844e628fbafe1ddd1a48ccf44d554fd27
treee734add5958bd7a81542c9b799aea06a8aca7dfa
parent7aaa52092c22bc1b2d67a0a2289bb77c56e066cf
If the device driver open call fails, don't set sc_open since in that case
we don't get a file handle back which could be closed again, and therefore
we couldn't toggle sc_open back to zero.

Spotted and ok anton@
sys/dev/video.c