summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-06-26 04:29:58 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-06-26 04:29:58 +0000
commit835f69788b607b9468c44928adcfb86f1a7fa20f (patch)
tree70ff9e40ede4216d6177868db6f8a0e98fe4e01f /sys
parentdd15c3fc335602ba08102cbb9627068516569706 (diff)
drm: encoder_slave: fix refcouting error for modules
From Wolfram Sang 50bda152c4d98ddf8f880edf21eb167758584c45 in linux 5.7.y/5.7.6 f78d4032de60f50fd4afaa0fb68ea03b985f820a in mainline linux
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/drm_encoder_slave.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/drm_encoder_slave.c b/sys/dev/pci/drm/drm_encoder_slave.c
index 436cc1fdb62..256e3c2ef05 100644
--- a/sys/dev/pci/drm/drm_encoder_slave.c
+++ b/sys/dev/pci/drm/drm_encoder_slave.c
@@ -85,7 +85,7 @@ int drm_i2c_encoder_init(struct drm_device *dev,
err = encoder_drv->encoder_init(client, dev, encoder);
if (err)
- goto fail_unregister;
+ goto fail_module_put;
if (info->platform_data)
encoder->slave_funcs->set_config(&encoder->base,
@@ -93,9 +93,10 @@ int drm_i2c_encoder_init(struct drm_device *dev,
return 0;
+fail_module_put:
+ module_put(module);
fail_unregister:
i2c_unregister_device(client);
- module_put(module);
fail:
return err;
}