On 11/29/16 23:12, Jyri Sarha wrote: > @@ -114,6 +118,9 @@ int drm_bridge_attach(struct drm_device *dev, struct drm_bridge *bridge) > if (bridge->dev) > return -EBUSY; > > + if (!try_module_get(bridge->module)) > + return -ENOENT; > + > bridge->dev = dev; > > if (bridge->funcs->attach) This sill needs: - if (bridge->funcs->attach) - return bridge->funcs->attach(bridge); + if (bridge->funcs->attach) { + int ret = bridge->funcs->attach(bridge); + + if (ret) { + module_put(bridge->module); + return ret; + } + } > @@ -144,6 +151,8 @@ void drm_bridge_detach(struct drm_bridge *bridge) > if (bridge->funcs->detach) > bridge->funcs->detach(bridge); > > + module_put(bridge->module); > + > bridge->dev = NULL; > } > EXPORT_SYMBOL(drm_bridge_detach); _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel