summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorRodrigo Siqueira <rodrigosiqueiramelo@gmail.com>2019-03-15 13:11:42 -0300
committerRodrigo Siqueira <rodrigosiqueiramelo@gmail.com>2019-06-06 20:33:28 -0300
commit1ae752bf390c84250b702bd7d983c94d6eda42e2 (patch)
tree3927bf02b779878e3fd63c54cd5079508653fee8 /drivers/gpu/drm
parent5e2f97a93f7043f2a95caebceea1ac5f9adf8ff9 (diff)
downloadlinux-stable-1ae752bf390c84250b702bd7d983c94d6eda42e2.tar.gz
linux-stable-1ae752bf390c84250b702bd7d983c94d6eda42e2.tar.bz2
linux-stable-1ae752bf390c84250b702bd7d983c94d6eda42e2.zip
drm/vkms: Remove useless call to drm_connector_register/unregister()
The function vkms_output_init() is invoked during the module initialization, and it handles the creation/configuration of the vkms essential elements (e.g., connectors, encoder, etc). Among the initializations, this function tries to initialize a connector and register it by calling drm_connector_register(). However, inside the drm_connector_register(), at the beginning of this function there is the following validation: if (!connector->dev->registered) return 0; In this sense, invoke drm_connector_register() after initializing the connector has no effect because the register field is false. The connector register happens when drm_dev_register() is invoked; the same issue exists with drm_connector_unregister(). Therefore, this commit removes the unnecessary call to drm_connector_register() and drm_connector_unregister(). Changes since v2: * Remove unnecessary call to drm_connector_unregister() * Remove unused label Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Reviewed-by: Daniel Vetter <daniel@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20190315161142.23gfu32lueyqrmyq@smtp.gmail.com
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/vkms/vkms_output.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/gpu/drm/vkms/vkms_output.c b/drivers/gpu/drm/vkms/vkms_output.c
index 3b162b25312e..56fb5c2a2315 100644
--- a/drivers/gpu/drm/vkms/vkms_output.c
+++ b/drivers/gpu/drm/vkms/vkms_output.c
@@ -6,7 +6,6 @@
static void vkms_connector_destroy(struct drm_connector *connector)
{
- drm_connector_unregister(connector);
drm_connector_cleanup(connector);
}
@@ -71,12 +70,6 @@ int vkms_output_init(struct vkms_device *vkmsdev)
drm_connector_helper_add(connector, &vkms_conn_helper_funcs);
- ret = drm_connector_register(connector);
- if (ret) {
- DRM_ERROR("Failed to register connector\n");
- goto err_connector_register;
- }
-
ret = drm_encoder_init(dev, encoder, &vkms_encoder_funcs,
DRM_MODE_ENCODER_VIRTUAL, NULL);
if (ret) {
@@ -99,9 +92,6 @@ err_attach:
drm_encoder_cleanup(encoder);
err_encoder:
- drm_connector_unregister(connector);
-
-err_connector_register:
drm_connector_cleanup(connector);
err_connector: