summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64/dev/vldcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/sparc64/dev/vldcp.c')
-rw-r--r--sys/arch/sparc64/dev/vldcp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/sparc64/dev/vldcp.c b/sys/arch/sparc64/dev/vldcp.c
index 6d686388f8e..ca48a469b59 100644
--- a/sys/arch/sparc64/dev/vldcp.c
+++ b/sys/arch/sparc64/dev/vldcp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vldcp.c,v 1.23 2022/07/02 08:50:41 visa Exp $ */
+/* $OpenBSD: vldcp.c,v 1.24 2022/07/10 08:33:00 visa Exp $ */
/*
* Copyright (c) 2009, 2012 Mark Kettenis
*
@@ -683,6 +683,7 @@ vldcpkqfilter(dev_t dev, struct knote *kn)
break;
default:
+ device_unref(&sc->sc_dv);
return (EINVAL);
}
@@ -692,5 +693,6 @@ vldcpkqfilter(dev_t dev, struct knote *kn)
klist_insert_locked(klist, kn);
splx(s);
+ device_unref(&sc->sc_dv);
return (0);
}