summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2023-07-26 11:04:08 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2023-07-26 11:04:08 +0000
commitf5a8620687b4f50c52e5895ddc49cef2d4d1a82d (patch)
tree9e10240321d499fd3e698ca7c0a1c46840daad82
parentd8c4d4920c95e87cc6e782f1c2968f671d4c97e4 (diff)
call kref_init() in drm_attach() matching the call in drm_dev_init()
-rw-r--r--sys/dev/pci/drm/drm_drv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/drm_drv.c b/sys/dev/pci/drm/drm_drv.c
index 940830493b0..cce43104508 100644
--- a/sys/dev/pci/drm/drm_drv.c
+++ b/sys/dev/pci/drm/drm_drv.c
@@ -1309,6 +1309,7 @@ drm_attach(struct device *parent, struct device *self, void *aux)
sc->sc_drm = dev;
+ kref_init(&dev->ref);
dev->dev = self;
dev->dev_private = parent;
dev->driver = da->driver;