call kref_init() in drm_attach() matching the call in drm_dev_init()
authorjsg <jsg@openbsd.org>
Wed, 26 Jul 2023 11:04:07 +0000 (11:04 +0000)
committerjsg <jsg@openbsd.org>
Wed, 26 Jul 2023 11:04:07 +0000 (11:04 +0000)
sys/dev/pci/drm/drm_drv.c

index 9408304..cce4310 100644 (file)
@@ -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;