Commit 683c09e9 authored by Wolfram Sang's avatar Wolfram Sang Committed by Emil Velikov

drm: encoder_slave: fix refcouting error for modules

module_put() balances try_module_get(), not request_module(). Fix the
error path to match that.

Fixes: 2066facc ("drm/kms: slave encoder interface.")
Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: default avatarEmil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: default avatarEmil Velikov <emil.l.velikov@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200316163907.13709-2-wsa+renesas@sang-engineering.com
parent c704b170
......@@ -84,7 +84,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,
......@@ -92,9 +92,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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment